Now that event_assign() special-cases event_self_cbarg(), event_new() can stop

This commit is contained in:
Nick Mathewson 2012-03-13 19:14:57 -04:00
parent 1da0e04a0a
commit 33e42ef3d3

View File

@ -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);