Skip to content
Snippets Groups Projects
Commit 4cefb6bf authored by Philip Withnall's avatar Philip Withnall Committed by Zeeshan Ali Khan
Browse files

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
parent 1194c234
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment