pspp-dev
[Top][All Lists]
Advanced

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

Re: Minor(ish) changes to PsppireValueEntry


From: Ben Pfaff
Subject: Re: Minor(ish) changes to PsppireValueEntry
Date: Tue, 24 Apr 2012 22:25:43 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

John Darrington <address@hidden> writes:

> I pushed this set of changes, with the mods we discussed.  If
> you think anything else is needed, please feel free to change
> it.

It looked OK to me.

I pushed one small simplification:

--8<--------------------------cut here-------------------------->8--

From: Ben Pfaff <address@hidden>
Date: Tue, 24 Apr 2012 22:24:55 -0700
Subject: [PATCH] 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.
---
 src/ui/gui/psppire-value-entry.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/ui/gui/psppire-value-entry.c b/src/ui/gui/psppire-value-entry.c
index 91dcdd4..a55a504 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);
 }
 
-- 
1.7.2.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]