]> Dogcows Code - chaz/openbox/commitdiff
declare vars at the top of the block
authorDana Jansens <danakj@orodu.net>
Tue, 22 Jul 2003 16:26:19 +0000 (16:26 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 22 Jul 2003 16:26:19 +0000 (16:26 +0000)
plugins/menu/fifo_menu.c

index fc5ed0e1e3e07105f3f205efae9559ec8dd5c6a3..71326225974ec18d5a49ea54cc13f78ccce96226 100644 (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")) {
This page took 0.026416 seconds and 4 git commands to generate.