diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-07-07 00:22:00 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-07-07 00:22:00 -0700 |
commit | 41025b35a897dd5c6fe06efc4121e2f421cd2e43 (patch) | |
tree | 091724b57ff73274f78a1c0c42ae6b64db4e0567 | |
parent | 96eeda41738a6ae19fafb6abc8dd153d93c678ae (diff) | |
download | connman-41025b35a897dd5c6fe06efc4121e2f421cd2e43.tar.gz connman-41025b35a897dd5c6fe06efc4121e2f421cd2e43.tar.bz2 connman-41025b35a897dd5c6fe06efc4121e2f421cd2e43.zip |
The g_strcmp0 does the NULL pointer checking already
-rw-r--r-- | src/device.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/device.c b/src/device.c index 4b71287b..aa53304e 100644 --- a/src/device.c +++ b/src/device.c @@ -512,14 +512,13 @@ static struct connman_network *find_network(struct connman_device *device, 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); |