]> git.kaiwu.me - nginx.git/commitdiff
test the most relevant condition first
authorIgor Sysoev <igor@sysoev.ru>
Mon, 3 Sep 2007 09:06:26 +0000 (09:06 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 3 Sep 2007 09:06:26 +0000 (09:06 +0000)
src/core/ngx_open_file_cache.c

index 87104a04a12668ba91ef6180418659aef330e8e2..dab98b3ff3c1eff0001f67213f81e4e2eeca254f 100644 (file)
@@ -353,8 +353,8 @@ create:
 
 update:
 
-    if ((ngx_event_flags & NGX_USE_VNODE_EVENT)
-        && of->events
+    if (of->events
+        && (ngx_event_flags & NGX_USE_VNODE_EVENT)
         && of->fd != NGX_INVALID_FILE)
     {
         file->event = ngx_calloc(sizeof(ngx_event_t), pool->log);