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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user