]> code.delx.au - gnu-emacs/blobdiff - src/inotify.c
Reorder conditions that are written backwards
[gnu-emacs] / src / inotify.c
index 17104c89064e77c0f63f75a59ef457d9a88b8e99..4efef9e55b7c0399e63edff86abf5e8ebb4983b2 100644 (file)
@@ -1,7 +1,6 @@
 /* Inotify support for Emacs
 
-Copyright (C) 2012
-  Free Software Foundation, Inc.
+Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -172,7 +171,6 @@ inotify_callback (int fd, void *_)
 
   EVENT_INIT (event);
   event.kind = FILE_NOTIFY_EVENT;
-  event.arg = Qnil;
 
   i = 0;
   while (i < (size_t)n)
@@ -187,14 +185,14 @@ inotify_callback (int fd, void *_)
           /* If event was removed automatically: Drop it from watch list.  */
           if (ev->mask & IN_IGNORED)
             watch_list = Fdelete (watch_object, watch_list);
+
+         if (!NILP (event.arg))
+           kbd_buffer_store_event (&event);
         }
 
       i += sizeof (*ev) + ev->len;
     }
 
-  if (!NILP (event.arg))
-    kbd_buffer_store_event (&event);
-
   xfree (buffer);
 }