]> granicus.if.org Git - graphviz/commitdiff
Fix bug in xlib plugin when HAVE_SYS_INOTIFY_H is not a feature.
authorerg <devnull@localhost>
Fri, 23 Feb 2007 19:07:45 +0000 (19:07 +0000)
committererg <devnull@localhost>
Fri, 23 Feb 2007 19:07:45 +0000 (19:07 +0000)
plugin/xlib/gvdevice_xlib.c

index 20c914cedbee8f74b81fc2924d97afdc05ec3b32..74bab86a16d401cdb5f4af21dd4bc3eb439964e4 100644 (file)
@@ -483,9 +483,10 @@ static void initialize_xlib(GVJ_t *firstjob)
 static void finalize_xlib(GVJ_t *firstjob)
 {
     GVJ_t *job;
-    Display *dpy;
-    KeyCode *keycodes;
-    int scr, inotify_fd=0, xlib_fd, ret, events;
+    Display *dpy = (Display *)(firstjob->display);
+    int scr = firstjob->screen;
+    KeyCode *keycodes= firstjob->keycodes;
+    int inotify_fd=0, xlib_fd, ret, events;
     fd_set rfds;
     struct timeval timeout;
 #ifdef HAVE_SYS_INOTIFY_H
@@ -494,10 +495,6 @@ static void finalize_xlib(GVJ_t *firstjob)
     static char *dir;
     char *p, *cwd = NULL;
 
-    dpy = (Display *)(firstjob->display);
-    scr = firstjob->screen;
-    keycodes = firstjob->keycodes;
-
     inotify_fd = inotify_init();
     if (inotify_fd < 0) {
        fprintf(stderr,"inotify_init() failed\n");