test the most relevant condition first
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index 87104a0..dab98b3 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -353,8 +353,8 @@
 
 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);