1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

sapi/fpm: little simplification for the kqueue backend.

This commit is contained in:
David Carlier
2024-02-17 23:22:56 +00:00
parent 76b7c5cc78
commit cedec11acf

View File

@@ -79,14 +79,12 @@ static int fpm_event_kqueue_init(int max) /* {{{ */
return -1;
}
kevents = malloc(sizeof(struct kevent) * max);
kevents = calloc(max, sizeof(struct kevent));
if (!kevents) {
zlog(ZLOG_ERROR, "epoll: unable to allocate %d events", max);
return -1;
}
memset(kevents, 0, sizeof(struct kevent) * max);
nkevents = max;
return 0;