[gtk+] testsuite: Fix potential strcmp() against NULL
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testsuite: Fix potential strcmp() against NULL
- Date: Sun, 24 Nov 2013 21:21:54 +0000 (UTC)
commit 9d7a442b8b76fc01c51864549b34ee9b85931f21
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]