Commits

Robert Lowry committed f0e291b

finally found this little bug after HOURS of debugging =D

Comments (0)

Files changed (1)

 watch_t *watch = NULL;
 char *nick = DEFAULT_NICK;
 int color = DEFAULT_COLOR_SETTING;
+int init;
 
 #ifdef HAVE_INOTIFY
-int evq, init;
-#endif
-
-#ifdef HAVE_KQUEUE
+int evq;
+#else
 int kq;
 #endif
 
 	watch_t *w;
 
 	while ((pid = waitpid(-1, NULL, WNOHANG)) > 0)
-		for (w = watch; w; w = watch->next)
+		for (w = watch; w; w = w->next)
 			if (w->pid == pid)
 				w->pid = 0;
 }