P2P: add a missing 'return' after building IE from an empty string

When building IE from an empty string and CONFIG_WPS_STRICT is
not defined, redundant 2 bytes are being added to the string.

We have to return right after building the "dummy" string.

Signed-off-by: Eliad Peller <eliad@wizery.com>
This commit is contained in:
Eliad Peller 2011-03-30 17:08:42 +03:00 committed by Jouni Malinen
parent e4bf4db907
commit 72863ea7c6

View file

@ -346,6 +346,7 @@ static void p2p_add_wps_string(struct wpabuf *buf, enum wps_attribute attr,
*/
wpabuf_put_be16(buf, 1);
wpabuf_put_u8(buf, ' ');
return;
}
#endif /* CONFIG_WPS_STRICT */
wpabuf_put_be16(buf, len);