[pygobject] Remove useless checks.



commit 0ab967ca40ddcffc2834d4e656bb2010c6b9bdda
Author: Simon van der Linden <svdlinden gnome org>
Date:   Thu Aug 12 10:46:17 2010 +0200

    Remove useless checks.
    
    No need to check for state->arg_infos, state->arg_type_infos, and
    state->args_is_auxiliary to be NULL, they are always allocated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=626684

 gi/pygi-invoke.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
index 47086ef..e3c6dc9 100644
--- a/gi/pygi-invoke.c
+++ b/gi/pygi-invoke.c
@@ -967,22 +967,14 @@ _free_invocation_state (struct invocation_state *state)
             g_base_info_unref ( (GIBaseInfo *) state->arg_infos[i]);
     }
 
-    if (state->arg_infos != NULL) {
-        g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_infos);
-    }
-
-    if (state->arg_type_infos != NULL) {
-        g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_type_infos);
-    }
+    g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_infos);
+    g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_type_infos);
+    g_slice_free1 (sizeof (gboolean) * state->n_args, state->args_is_auxiliary);
 
     if (state->args != NULL) {
         g_slice_free1 (sizeof (gpointer) * state->n_args, state->args);
     }
 
-    if (state->args_is_auxiliary != NULL) {
-        g_slice_free1 (sizeof (gboolean) * state->n_args, state->args_is_auxiliary);
-    }
-
     if (state->in_args != NULL) {
         g_slice_free1 (sizeof (GArgument) * state->n_in_args, state->in_args);
     }



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