From: Daniel Wagner <[email protected]>
The address of an array is never NULL, so
the comparison will always evaluate the same way.
Reported by coverity.
---
gsupplicant/supplicant.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 438d7f6..31a34c3 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -732,7 +732,7 @@ const void
*g_supplicant_interface_get_wps_ssid(GSupplicantInterface *interface,
if (!ssid_len)
return NULL;
- if (!interface || !interface->wps_cred.ssid) {
+ if (!interface || interface->wps_cred.ssid[0] == '\0') {
*ssid_len = 0;
return NULL;
}
@@ -850,7 +850,7 @@ const char
*g_supplicant_network_get_security(GSupplicantNetwork *network)
const void *g_supplicant_network_get_ssid(GSupplicantNetwork *network,
unsigned int *ssid_len)
{
- if (!network || !network->ssid) {
+ if (!network || network->ssid[0] == '\0') {
*ssid_len = 0;
return NULL;
}
--
1.8.4.474.g128a96c
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman