declare vars at the top of the block

This commit is contained in:
Dana Jansens 2003-07-22 16:26:19 +00:00
parent ea6258ce0f
commit 3340aaeb4d

View file

@ -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")) {