r15604 - gnucash/trunk/src/engine - Separate out the tests; in case they occur, you then know which condition to look for.

Josh Sled jsled at cvs.gnucash.org
Sun Feb 18 15:21:28 EST 2007


Author: jsled
Date: 2007-02-18 15:21:27 -0500 (Sun, 18 Feb 2007)
New Revision: 15604
Trac: http://svn.gnucash.org/trac/changeset/15604

Modified:
   gnucash/trunk/src/engine/Recurrence.c
Log:
Separate out the tests; in case they occur, you then know which condition to look for.

Modified: gnucash/trunk/src/engine/Recurrence.c
===================================================================
--- gnucash/trunk/src/engine/Recurrence.c	2007-02-18 19:32:07 UTC (rev 15603)
+++ gnucash/trunk/src/engine/Recurrence.c	2007-02-18 20:21:27 UTC (rev 15604)
@@ -137,8 +137,10 @@
     const GDate *start;
     guint mult;
 
-    g_return_if_fail(r && ref);
-    g_return_if_fail(g_date_valid(&r->start) && g_date_valid(ref));
+    g_return_if_fail(r);
+    g_return_if_fail(ref);
+    g_return_if_fail(g_date_valid(&r->start));
+    g_return_if_fail(g_date_valid(ref));
 
     /* If the ref date comes before the start date then the next
        occurrence is always the start date, and we're done. */



More information about the gnucash-changes mailing list