mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
Now that event_assign() special-cases event_self_cbarg(), event_new() can stop
This commit is contained in:
parent
1da0e04a0a
commit
33e42ef3d3
2
event.c
2
event.c
@ -1927,8 +1927,6 @@ event_new(struct event_base *base, evutil_socket_t fd, short events, void (*cb)(
|
||||
ev = mm_malloc(sizeof(struct event));
|
||||
if (ev == NULL)
|
||||
return (NULL);
|
||||
if (arg == &event_self_cbarg_ptr_)
|
||||
arg = ev;
|
||||
if (event_assign(ev, base, fd, events, cb, arg) < 0) {
|
||||
mm_free(ev);
|
||||
return (NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user