WPS: Remove unnecessary filename NULL check

The caller of the GET parser is checking this already and the GET case
was the only one that ended up doing the duplicated validation step.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-02-22 13:43:08 +02:00
parent 29513e461a
commit 80f256a568

View file

@ -324,8 +324,6 @@ static void web_connection_parse_get(struct upnp_wps_device_sm *sm,
* It is not required that filenames be case insensitive but it is * It is not required that filenames be case insensitive but it is
* allowed and cannot hurt here. * allowed and cannot hurt here.
*/ */
if (filename == NULL)
filename = "(null)"; /* just in case */
if (os_strcasecmp(filename, UPNP_WPS_DEVICE_XML_FILE) == 0) { if (os_strcasecmp(filename, UPNP_WPS_DEVICE_XML_FILE) == 0) {
wpa_printf(MSG_DEBUG, "WPS UPnP: HTTP GET for device XML"); wpa_printf(MSG_DEBUG, "WPS UPnP: HTTP GET for device XML");
req = GET_DEVICE_XML_FILE; req = GET_DEVICE_XML_FILE;