From: Ben Pfaff Date: Wed, 25 Apr 2012 05:24:55 +0000 (-0700) Subject: PsppireValueEntry: Simplify 'if' condition. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=1b4785cbce99af4c195b5ddd9e08b3f3c3569bd5 PsppireValueEntry: Simplify 'if' condition. The statement if ((model != NULL) && (model != old_model)) can be simplifed to just: if (model != NULL) because if 'model' is nonnull then it is different from old_model, because 'model' is a newly allocated GtkListStore. --- diff --git a/src/ui/gui/psppire-value-entry.c b/src/ui/gui/psppire-value-entry.c index 91dcdd4793..a55a50465c 100644 --- a/src/ui/gui/psppire-value-entry.c +++ b/src/ui/gui/psppire-value-entry.c @@ -280,7 +280,7 @@ psppire_value_entry_refresh_model (PsppireValueEntry *obj) } gtk_combo_box_set_model (GTK_COMBO_BOX (obj), model); - if ((model != NULL) && (model != old_model)) + if (model != NULL) g_object_unref (model); }