[glib] Fix an oversight
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix an oversight
- Date: Sun, 21 Feb 2010 20:30:37 +0000 (UTC)
commit ecb45f43824cdae003cf1280eb0c13039619d6b5
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 21 15:28:04 2010 -0500
Fix an oversight
_Always_ explicitly compare strcmp to 0... this was pointed out in
bug 610484 by Christian Persch.
glib/gvariant.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gvariant.c b/glib/gvariant.c
index 6ed560d..b0648a9 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]