if (tmp_ssid && memcmp(ssid, tmp_ssid, tmp_ssid_size))
continue;
- if (security && tmp_security &&
- g_strcmp0(security, tmp_security))
+ if (g_strcmp0(security, tmp_security) != 0)
continue;
- if (mode && tmp_mode && g_strcmp0(mode, tmp_mode))
+ if (g_strcmp0(mode, tmp_mode) != 0)
continue;
- if (address && tmp_address && g_strcmp0(address, tmp_address))
+ if (g_strcmp0(address, tmp_address) != 0)
continue;
return connman_network_ref(value);