D-Bus: Avoid compiler warning on sometimes uninitialized variable
The logic in wpas_dbus_signal_p2p_provision_discovery() seemed to imply that there could be a case where _signal would be used uninitized. While that is not the case since either (request || !status) or (!request && status) would always be true, some compilers do not seem to be clever enough to figure that out to avoid the warning. Make this easier for such compilers by removing the (!request && status) condition since it is identical to !(request || !status). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
bc7baaff24
commit
19d4dab759
1 changed files with 2 additions and 1 deletions
|
@ -1056,9 +1056,10 @@ void wpas_dbus_signal_p2p_provision_discovery(struct wpa_supplicant *wpa_s,
|
|||
"ProvisionDiscoveryPBCResponse";
|
||||
else
|
||||
return; /* Unknown or un-supported method */
|
||||
} else if (!request && status)
|
||||
} else {
|
||||
/* Explicit check for failure response */
|
||||
_signal = "ProvisionDiscoveryFailure";
|
||||
}
|
||||
|
||||
add_pin = ((request && (config_methods & WPS_CONFIG_DISPLAY)) ||
|
||||
(!request && !status &&
|
||||
|
|
Loading…
Reference in a new issue