diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2021-01-06 17:24:00 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2021-01-06 17:24:00 +0000 |
commit | e233859544cfa4df6fe4b0174e2312f173cdd603 (patch) | |
tree | 765ae797cdf372c396bba442d75133d3cac0d544 /glib | |
parent | 7f7512b62e96f5c2422a549a16400f8255621ef7 (diff) | |
download | glib-e233859544cfa4df6fe4b0174e2312f173cdd603.tar.gz |
gerror: Drop a redundant condition
At this point, if `dest` is non-`NULL` then we can guarantee
`*dest != NULL` due to `g_propagate_error()` succeeding.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Diffstat (limited to 'glib')
-rw-r--r-- | glib/gerror.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glib/gerror.c b/glib/gerror.c index 5199bdd60..18be9edec 100644 --- a/glib/gerror.c +++ b/glib/gerror.c @@ -1111,10 +1111,11 @@ g_propagate_prefixed_error (GError **dest, { g_propagate_error (dest, src); - if (dest && *dest) + if (dest) { va_list ap; + g_assert (*dest != NULL); va_start (ap, format); g_error_add_prefix (&(*dest)->message, format, ap); va_end (ap); |