PsppireValueEntry: Simplify 'if' condition.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 25 Apr 2012 05:24:55 +0000 (22:24 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 25 Apr 2012 05:24:55 +0000 (22:24 -0700)
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.

src/ui/gui/psppire-value-entry.c

index 91dcdd47931e1c93e6ebdeee5fe0751f95f2c582..a55a50465c66aea9d916ef2240ae039cf90794ff 100644 (file)
@@ -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);
 }