[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/13] psppire-dict: g_return_if_fail for idx in psppire_dict
From: |
John Darrington |
Subject: |
Re: [PATCH 01/13] psppire-dict: g_return_if_fail for idx in psppire_dict_get_variable(). |
Date: |
Wed, 18 Apr 2012 09:17:51 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Apr 17, 2012 at 09:13:34PM -0700, Ben Pfaff wrote:
John Darrington <address@hidden> writes:
> + g_return_val_if_fail (idx < 0 || dict_get_var_cnt (d->dict) <=
idx, NULL);
>
> Personally I prefer assertions to be written in their separate
components rather than ored
> together, like this:
>
> g_return_val_if_fail (idx < 0, NULL);
> g_return_val_if_fail (dict_get_var_cnt (d->dict) <= idx, NULL);
>
> That way, when the condition fails, it's easier to find out which part
of the condition is failing.
Fair enough. I made that change and pushed this commit.
This seems to be causing the GUI to crash.
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature
[PATCH 02/13] gui: Use canonical names for signals., Ben Pfaff, 2012/04/16
[PATCH 03/13] gui: Add undocumented --measure-startup option., Ben Pfaff, 2012/04/16
[PATCH 04/13] gui: Call g_thread_init() earlier., Ben Pfaff, 2012/04/16
[PATCH 05/13] format: New functions fmt_change_width(), fmt_change_decimals()., Ben Pfaff, 2012/04/16
[PATCH 07/13] format: Fix typo in comment., Ben Pfaff, 2012/04/16