diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-10-29 16:35:15 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-10-29 16:35:15 +0000 |
commit | 1eadb3e3a299da5c384422792a672ff022870f4c (patch) | |
tree | d3265db5878b81272ffa4078473ad32296843205 /select.c | |
parent | c70c25937e6c6f2d20cdf3d19f95dd80790935e5 (diff) | |
download | libevent-1eadb3e3a299da5c384422792a672ff022870f4c.tar.gz |
Actually use the logic in select.c designed to make the out_sets threadsafe.
svn:r1475
Diffstat (limited to 'select.c')
-rw-r--r-- | select.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -200,8 +200,6 @@ select_resize(struct selectop *sop, int fdsz) fd_set *readset_in = NULL; fd_set *writeset_in = NULL; - fd_set *readset_out = NULL; - fd_set *writeset_out = NULL; n_events = (fdsz/sizeof(fd_mask)) * NFDBITS; n_events_old = (sop->event_fdsz/sizeof(fd_mask)) * NFDBITS; @@ -212,15 +210,10 @@ select_resize(struct selectop *sop, int fdsz) if ((readset_in = mm_realloc(sop->event_readset_in, fdsz)) == NULL) goto error; sop->event_readset_in = readset_in; - if ((readset_out = mm_realloc(sop->event_readset_out, fdsz)) == NULL) - goto error; - sop->event_readset_out = readset_out; if ((writeset_in = mm_realloc(sop->event_writeset_in, fdsz)) == NULL) goto error; sop->event_writeset_in = writeset_in; - if ((writeset_out = mm_realloc(sop->event_writeset_out, fdsz)) == NULL) - goto error; - sop->event_writeset_out = writeset_out; + sop->resize_out_sets = 1; memset((char *)sop->event_readset_in + sop->event_fdsz, 0, fdsz - sop->event_fdsz); |