projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9d0f71
)
PsppireValueEntry: Simplify 'if' condition.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 25 Apr 2012 05:24:55 +0000
(22:24 -0700)
committer
Ben 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
patch
|
blob
|
history
diff --git
a/src/ui/gui/psppire-value-entry.c
b/src/ui/gui/psppire-value-entry.c
index 91dcdd47931e1c93e6ebdeee5fe0751f95f2c582..a55a50465c66aea9d916ef2240ae039cf90794ff 100644
(file)
--- 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);
}