From: Dana Jansens Date: Tue, 22 Jul 2003 16:26:19 +0000 (+0000) Subject: declare vars at the top of the block X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=3340aaeb4d4e07cfe13722900f09dde82be18ce3;p=chaz%2Fopenbox declare vars at the top of the block --- diff --git a/plugins/menu/fifo_menu.c b/plugins/menu/fifo_menu.c index fc5ed0e1..71326225 100644 --- a/plugins/menu/fifo_menu.c +++ b/plugins/menu/fifo_menu.c @@ -79,15 +79,18 @@ void fifo_menu_handler(int fd, void *d) { num_realloc); if (num_read == 0) { /* eof */ + xmlDocPtr doc; + xmlNodePtr node; + menu->invalid = TRUE; menu_clear(menu); FIFO_MENU_DATA(menu)->buf[FIFO_MENU_DATA(menu)->buflen] = '\0'; - xmlDocPtr doc = xmlParseMemory(FIFO_MENU_DATA(menu)->buf, - FIFO_MENU_DATA(menu)->buflen); + doc = xmlParseMemory(FIFO_MENU_DATA(menu)->buf, + FIFO_MENU_DATA(menu)->buflen); - xmlNodePtr node = xmlDocGetRootElement(doc); + node = xmlDocGetRootElement(doc); if (node && !xmlStrcasecmp(node->name, (const xmlChar*) "fifo_menu")) {