declare vars at the top of the block
This commit is contained in:
parent
ea6258ce0f
commit
3340aaeb4d
1 changed files with 6 additions and 3 deletions
|
@ -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")) {
|
||||
|
|
Loading…
Reference in a new issue