From: Jouni Malinen Date: Sun, 2 Mar 2014 14:23:28 +0000 (+0200) Subject: WPS: Remove duplicate variable setting X-Git-Tag: hostap_2_2~684 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b6170b78d9fcae737675affb2d54e34f819d0aa;p=thirdparty%2Fhostap.git WPS: Remove duplicate variable setting There is no need to use a for loop here since the h variable is set identically at the beginning of the body anyway. Signed-off-by: Jouni Malinen --- diff --git a/src/wps/wps_upnp_web.c b/src/wps/wps_upnp_web.c index 2a3b63607..54c3658ad 100644 --- a/src/wps/wps_upnp_web.c +++ b/src/wps/wps_upnp_web.c @@ -946,7 +946,7 @@ static void web_connection_parse_subscribe(struct upnp_wps_device_sm *sm, wpa_printf(MSG_DEBUG, "WPS UPnP: HTTP SUBSCRIBE for event"); end = os_strchr(h, '\n'); - for (; end != NULL; h = end + 1) { + while (end) { /* Option line by option line */ h = end + 1; end = os_strchr(h, '\n'); @@ -1153,7 +1153,7 @@ static void web_connection_parse_unsubscribe(struct upnp_wps_device_sm *sm, wpa_printf(MSG_DEBUG, "WPS UPnP: HTTP UNSUBSCRIBE for event"); end = os_strchr(h, '\n'); - for (; end != NULL; h = end + 1) { + while (end) { /* Option line by option line */ h = end + 1; end = os_strchr(h, '\n');