aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-31 09:49:58 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-31 14:25:20 (GMT)
commitb8e20236c1b9847f66d453c229d34247be868b15 (patch)
treed4fc1dd4e95f7ff02c5b119cbdfa6f388be82216 /src
parent476daa0585bed2b87460b062a6e744908c2a769f (diff)
downloadhostap-b8e20236c1b9847f66d453c229d34247be868b15.zip
hostap-b8e20236c1b9847f66d453c229d34247be868b15.tar.gz
hostap-b8e20236c1b9847f66d453c229d34247be868b15.tar.bz2
WPS: Merge event_send_start() error paths
There is no need to keep these separate. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/wps/wps_upnp_event.c8
1 files 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);