summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2021-01-06 17:24:00 +0000
committerPhilip Withnall <pwithnall@endlessos.org>2021-01-06 17:24:00 +0000
commite233859544cfa4df6fe4b0174e2312f173cdd603 (patch)
tree765ae797cdf372c396bba442d75133d3cac0d544 /glib
parent7f7512b62e96f5c2422a549a16400f8255621ef7 (diff)
downloadglib-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.c3
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);