summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2016-03-23 09:00:16 +0000
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>2016-03-23 12:38:30 +0000
commit4cefb6bf6d1835776e687f7302967e4ba9c22335 (patch)
tree0c358d72e88c073a282dda08ac40ae65a5de79c7
parent1194c23407f04153e541d4dc636e1dfa83786624 (diff)
downloadgeoclue-4cefb6bf6d1835776e687f7302967e4ba9c22335.tar.gz
service-client: Fix comparison against zero
g_variant_n_children() is unsigned, so comparing < 0 will always be false; this looks like a typo for <= 0, which would avoid allocating the GVariantIter unnecessarily. Spotted by Coverity (CID: #78509). https://bugs.freedesktop.org/show_bug.cgi?id=94669
-rw-r--r--src/gclue-service-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gclue-service-client.c b/src/gclue-service-client.c
index 68564c7..9bb9cd2 100644
--- a/src/gclue-service-client.c
+++ b/src/gclue-service-client.c
@@ -238,7 +238,7 @@ on_agent_props_changed (GDBusProxy *agent_proxy,
GVariant *value;
gchar *key;
- if (g_variant_n_children (changed_properties) < 0)
+ if (g_variant_n_children (changed_properties) <= 0)
return;
g_variant_get (changed_properties, "a{sv}", &iter);