From 708b194e9da83e81cb147601795e809cc3754ee0 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Fri, 12 Jul 2013 14:26:24 -0400 Subject: [PATCH] * #27201: libiax: removed dead code prev is always NULL. --- daemon/libs/iax2/iax.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/daemon/libs/iax2/iax.c b/daemon/libs/iax2/iax.c index ef2628e856..90603f881e 100644 --- a/daemon/libs/iax2/iax.c +++ b/daemon/libs/iax2/iax.c @@ -3131,7 +3131,7 @@ struct iax_event *iax_net_process(unsigned char *buf, int len, struct sockaddr_i static struct iax_sched *iax_get_sched(struct timeval tv) { - struct iax_sched *cur, *prev=NULL; + struct iax_sched *cur; cur = schedq; /* Check the event schedule first. */ while(cur) { @@ -3139,11 +3139,7 @@ static struct iax_sched *iax_get_sched(struct timeval tv) ((tv.tv_sec == cur->when.tv_sec) && (tv.tv_usec >= cur->when.tv_usec))) { /* Take it out of the event queue */ - if (prev) { - prev->next = cur->next; - } else { - schedq = cur->next; - } + schedq = cur->next; return cur; } cur = cur->next; -- GitLab