[glib: 6/7] gvariant-parser: Shut up a scan-build warning
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/7] gvariant-parser: Shut up a scan-build warning
- Date: Wed, 30 Oct 2019 16:24:13 +0000 (UTC)
commit 1111bc4cdef49d2b2bb062f1394873ea64ae5d8f
Author: Philip Withnall <withnall endlessm com>
Date: Wed Oct 30 15:37:39 2019 +0000
gvariant-parser: Shut up a scan-build warning
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 <withnall endlessm com>
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]