[gtk+] grid: Remove unnecessary NULL checks



commit 70aeeab3558b7d929cf7f9c53a9d6ba60e3364a2
Author: Timm Bäder <mail baedert org>
Date:   Fri Apr 28 11:25:21 2017 +0200

    grid: Remove unnecessary NULL checks
    
    The minimum and natural pointers passed to measure are never NULL and
    that's the only place where we call gtk_grid_get_size_for_size.

 gtk/gtkgrid.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 6689965..7079991 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -1470,11 +1470,8 @@ gtk_grid_get_size_for_size (GtkGrid        *grid,
   GtkGridLines *lines;
   gint min_size, nat_size;
 
-  if (minimum)
-    *minimum = 0;
-
-  if (natural)
-    *natural = 0;
+  *minimum = 0;
+  *natural = 0;
 
   if (minimum_baseline)
     *minimum_baseline = -1;


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