[gtk+/gtk-3-10] testsuite: Fix potential strcmp() against NULL
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] testsuite: Fix potential strcmp() against NULL
- Date: Tue, 26 Nov 2013 21:19:35 +0000 (UTC)
commit 11d4cf9c9019cf92ba21ad013b908e5c87daa84a
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Nov 20 17:39:21 2013 +0000
testsuite: Fix potential strcmp() against NULL
Use g_strcmp0() instead.
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
testsuite/gtk/object.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/testsuite/gtk/object.c b/testsuite/gtk/object.c
index 1bfd1bf..055fc3a 100644
--- a/testsuite/gtk/object.c
+++ b/testsuite/gtk/object.c
@@ -225,7 +225,7 @@ object_test_property (GObject *object,
(MATCH_ANY_VALUE == ignore_properties[i].value ||
value_as_pointer (&value) == ignore_properties[i].value ||
(G_VALUE_HOLDS_STRING (&value) &&
- strcmp (g_value_get_string (&value), ignore_properties[i].value) == 0))))
+ g_strcmp0 (g_value_get_string (&value), ignore_properties[i].value) == 0))))
break;
/* ignore known property bugs if not testing thoroughly */
if (ignore_properties[i].name == NULL && !g_test_thorough ())
@@ -237,7 +237,7 @@ object_test_property (GObject *object,
(MATCH_ANY_VALUE == ignore_properties[i].value ||
value_as_pointer (&value) == ignore_properties[i].value ||
(G_VALUE_HOLDS_STRING (&value) &&
- strcmp (g_value_get_string (&value), ignore_properties[i].value) == 0)))
+ g_strcmp0 (g_value_get_string (&value), ignore_properties[i].value) == 0)))
break;
}
/* assign unignored properties */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]