check: Use g_strcmp0 instead of strcmp

Avoids segfaults when using NULL arguments.
This commit is contained in:
Edward Hervey 2010-08-30 12:47:31 +02:00
parent e406f7c572
commit 8c2481dd57

View file

@ -187,7 +187,7 @@ G_STMT_START { \
G_STMT_START { \
const gchar * first = a; \
const gchar * second = b; \
fail_unless(strcmp (first, second) == 0, \
fail_unless(g_strcmp0 (first, second) == 0, \
"'" #a "' (%s) is not equal to '" #b"' (%s)", first, second); \
} G_STMT_END;
/**