[glib: 1/4] gerror: Drop a redundant branch




commit 7f7512b62e96f5c2422a549a16400f8255621ef7
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Jan 6 17:23:31 2021 +0000

    gerror: Drop a redundant branch
    
    At this point, `src` is guaranteed to be non-`NULL` due to the
            precondition check.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 glib/gerror.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/glib/gerror.c b/glib/gerror.c
index 5fa489013..5199bdd60 100644
--- a/glib/gerror.c
+++ b/glib/gerror.c
@@ -1012,8 +1012,7 @@ g_propagate_error (GError **dest,
  
   if (dest == NULL)
     {
-      if (src)
-        g_error_free (src);
+      g_error_free (src);
       return;
     }
   else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]