]> git.kaiwu.me - nginx.git/commitdiff
Events: fixed copying of old events in poll init.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 24 Jan 2019 18:50:37 +0000 (21:50 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 24 Jan 2019 18:50:37 +0000 (21:50 +0300)
Previously, the code incorrectly assumed "ngx_event_t *" elements
instead of "struct pollfd".

This is mostly cosmetic change, as this code is never called now.

src/event/modules/ngx_poll_module.c

index 4e03dabf2a94ca271fe07283b442961881e58d92..b46ab538abd6a39d695641535465a77df797b8b5 100644 (file)
@@ -84,7 +84,7 @@ ngx_poll_init(ngx_cycle_t *cycle, ngx_msec_t timer)
         }
 
         if (event_list) {
-            ngx_memcpy(list, event_list, sizeof(ngx_event_t *) * nevents);
+            ngx_memcpy(list, event_list, sizeof(struct pollfd) * nevents);
             ngx_free(event_list);
         }