From ecb45f43824cdae003cf1280eb0c13039619d6b5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 21 Feb 2010 15:28:04 -0500 Subject: [PATCH] Fix an oversight _Always_ explicitly compare strcmp to 0... this was pointed out in bug 610484 by Christian Persch. --- glib/gvariant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gvariant.c b/glib/gvariant.c index 6ed560d0d..b0648a9db 100644 --- a/glib/gvariant.c +++ b/glib/gvariant.c @@ -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); }