mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 20:41:27 -04:00
Remove some dead assignments
This commit is contained in:
parent
d14bb926b4
commit
47c5dfbea9
3
evutil.c
3
evutil.c
@ -550,7 +550,6 @@ struct evutil_addrinfo *
|
|||||||
evutil_new_addrinfo(struct sockaddr *sa, ev_socklen_t socklen,
|
evutil_new_addrinfo(struct sockaddr *sa, ev_socklen_t socklen,
|
||||||
const struct evutil_addrinfo *hints)
|
const struct evutil_addrinfo *hints)
|
||||||
{
|
{
|
||||||
size_t extra;
|
|
||||||
struct evutil_addrinfo *res;
|
struct evutil_addrinfo *res;
|
||||||
EVUTIL_ASSERT(hints);
|
EVUTIL_ASSERT(hints);
|
||||||
|
|
||||||
@ -574,8 +573,6 @@ evutil_new_addrinfo(struct sockaddr *sa, ev_socklen_t socklen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We're going to allocate extra space to hold the sockaddr. */
|
/* We're going to allocate extra space to hold the sockaddr. */
|
||||||
extra = (hints->ai_family == PF_INET) ? sizeof(struct sockaddr_in) :
|
|
||||||
sizeof(struct sockaddr_in6);
|
|
||||||
res = mm_calloc(1,sizeof(struct evutil_addrinfo)+socklen);
|
res = mm_calloc(1,sizeof(struct evutil_addrinfo)+socklen);
|
||||||
if (!res)
|
if (!res)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
5
select.c
5
select.c
@ -192,14 +192,9 @@ select_dispatch(struct event_base *base, struct timeval *tv)
|
|||||||
static int
|
static int
|
||||||
select_resize(struct selectop *sop, int fdsz)
|
select_resize(struct selectop *sop, int fdsz)
|
||||||
{
|
{
|
||||||
int n_events, n_events_old;
|
|
||||||
|
|
||||||
fd_set *readset_in = NULL;
|
fd_set *readset_in = NULL;
|
||||||
fd_set *writeset_in = NULL;
|
fd_set *writeset_in = NULL;
|
||||||
|
|
||||||
n_events = (fdsz/sizeof(fd_mask)) * NFDBITS;
|
|
||||||
n_events_old = (sop->event_fdsz/sizeof(fd_mask)) * NFDBITS;
|
|
||||||
|
|
||||||
if (sop->event_readset_in)
|
if (sop->event_readset_in)
|
||||||
check_selectop(sop);
|
check_selectop(sop);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user