From 3340aaeb4d4e07cfe13722900f09dde82be18ce3 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 22 Jul 2003 16:26:19 +0000 Subject: [PATCH] declare vars at the top of the block --- plugins/menu/fifo_menu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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")) { -- 2.45.2