[goffice] Rangefuncs: this reversed condition.



commit 7c0afc7708f39a57a2d5023d32ce7a1ee3ec22e8
Author: Morten Welinder <terra gnome org>
Date:   Fri Sep 30 17:04:53 2011 -0400

    Rangefuncs: this reversed condition.

 goffice/math/go-rangefunc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/goffice/math/go-rangefunc.c b/goffice/math/go-rangefunc.c
index e62bb44..1faa6f2 100644
--- a/goffice/math/go-rangefunc.c
+++ b/goffice/math/go-rangefunc.c
@@ -74,7 +74,7 @@ SUFFIX(sum_helper) (DOUBLE const *xs, int n, int *all_id)
 
 	i = SUFFIX(identical_helper) (xs, n);
 	*all_id = (i == n);
-	sum = i ? 0 : i * (LDOUBLE)(xs[0]);
+	sum = i ? i * (LDOUBLE)(xs[0]) : 0;
 
 	for (; i < n; i++)
 		sum += xs[i];



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