From 1111bc4cdef49d2b2bb062f1394873ea64ae5d8f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 30 Oct 2019 15:37:39 +0000 Subject: [PATCH] gvariant-parser: Shut up a scan-build warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change a condition from one to an equivalent one to shut up a `scan-build` warning about potentially dereferencing a `NULL` value. This introduces no functional changes, as it’s not actually possible to dereference a `NULL` value here (but `scan-build` can’t link the nullability of `error` to the nullability of `result`). Signed-off-by: Philip Withnall --- glib/gvariant-parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c index 8a6d4d316..bb5238bea 100644 --- a/glib/gvariant-parser.c +++ b/glib/gvariant-parser.c @@ -2543,7 +2543,7 @@ g_variant_new_parsed_va (const gchar *format, ast_free (ast); } - if (result == NULL) + if (error != NULL) g_error ("g_variant_new_parsed: %s", error->message); if (*stream.stream)