Merge branch 'cmpstrv-null-check' into 'master'

Minor Coverity fixes

See merge request GNOME/glib!1755
This commit is contained in:
Sebastian Dröge 2020-11-17 11:01:30 +00:00
commit c3388932fd
2 changed files with 3 additions and 2 deletions

View File

@ -3055,8 +3055,8 @@ g_assertion_message_cmpstrv (const char *domain,
const char *s1 = arg1[first_wrong_idx], *s2 = arg2[first_wrong_idx];
char *a1, *a2, *s, *t1 = NULL, *t2 = NULL;
a1 = arg1 ? g_strconcat ("\"", t1 = g_strescape (s1, NULL), "\"", NULL) : g_strdup ("NULL");
a2 = arg2 ? g_strconcat ("\"", t2 = g_strescape (s2, NULL), "\"", NULL) : g_strdup ("NULL");
a1 = g_strconcat ("\"", t1 = g_strescape (s1, NULL), "\"", NULL);
a2 = g_strconcat ("\"", t2 = g_strescape (s2, NULL), "\"", NULL);
g_free (t1);
g_free (t2);
s = g_strdup_printf ("assertion failed (%s): first differing element at index %" G_GSIZE_FORMAT ": %s does not equal %s",

View File

@ -1316,6 +1316,7 @@ test_match_all (gconstpointer d)
g_assert (match_ok);
match_count = g_match_info_get_match_count (match_info);
g_assert_cmpint (match_count, >=, 0);
if (match_count != g_slist_length (data->expected))
{