Fix an oversight
authorMatthias Clasen <mclasen@redhat.com>
Sun, 21 Feb 2010 20:28:04 +0000 (15:28 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 21 Feb 2010 20:28:04 +0000 (15:28 -0500)
_Always_ explicitly compare strcmp to 0... this was pointed out in
bug 610484 by Christian Persch.

glib/gvariant.c

index 6ed560d..b0648a9 100644 (file)
@@ -1846,7 +1846,7 @@ g_variant_equal (gconstpointer one,
 
       strone = g_variant_print ((GVariant *) one, FALSE);
       strtwo = g_variant_print ((GVariant *) two, FALSE);
-      equal = strcmp (strone, strtwo);
+      equal = strcmp (strone, strtwo) == 0;
       g_free (strone);
       g_free (strtwo);
     }