Code

screen_browser: explicitly initialize local variable
authorMax Kellermann <max@duempel.org>
Thu, 10 Dec 2009 06:36:42 +0000 (07:36 +0100)
committerMax Kellermann <max@duempel.org>
Thu, 10 Dec 2009 06:36:42 +0000 (07:36 +0100)
Make gcc happy.

src/screen_browser.c

index ef6614167d31f30a21c03f2834cedf40152b0a0b..50769b88a911c13dfdd27c9618329b004a4062ad 100644 (file)
@@ -330,14 +330,15 @@ browser_handle_add(struct screen_browser *browser, struct mpdclient *c)
 {
        struct list_window_range range;
        struct filelist_entry *entry;
-       bool success;
+       bool success = false;
 
        list_window_get_range(browser->lw, &range);
        for (unsigned i = range.start; i < range.end; ++i) {
                entry = browser_get_index(browser, i);
 
                if (entry != NULL && entry->entity != NULL)
-                       success = browser_select_entry(c, entry, FALSE);
+                       success = browser_select_entry(c, entry, FALSE) ||
+                               success;
        }
 
        return range.end == range.start + 1 && success;