From 299f677cd7f02d25e475a97fb82b0223f1564cfb Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Thu, 24 Jan 2019 21:50:37 +0300 Subject: [PATCH] Events: fixed copying of old events in poll init. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c index 4e03dabf2..b46ab538a 100644 --- a/src/event/modules/ngx_poll_module.c +++ b/src/event/modules/ngx_poll_module.c @@ -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); }