From b8e20236c1b9847f66d453c229d34247be868b15 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 31 Aug 2015 12:49:58 +0300 Subject: [PATCH] WPS: Merge event_send_start() error paths There is no need to keep these separate. Signed-off-by: Jouni Malinen --- src/wps/wps_upnp_event.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/wps/wps_upnp_event.c b/src/wps/wps_upnp_event.c index 2c8ed4f..94aae75 100644 --- a/src/wps/wps_upnp_event.c +++ b/src/wps/wps_upnp_event.c @@ -276,11 +276,9 @@ static int event_send_start(struct subscription *s) * Assume we are called ONLY with no current event and ONLY with * nonempty event queue and ONLY with at least one address to send to. */ - if (dl_list_empty(&s->addr_list)) - return -1; - if (s->current_event) - return -1; - if (dl_list_empty(&s->event_queue)) + if (dl_list_empty(&s->addr_list) || + s->current_event || + dl_list_empty(&s->event_queue)) return -1; s->current_event = e = event_dequeue(s); -- 2.1.4