[goffice] go_range_increasing, go_range_decreasing: Add preconditions.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] go_range_increasing, go_range_decreasing: Add preconditions.
- Date: Fri, 20 Aug 2010 15:38:00 +0000 (UTC)
commit 3c26174918afe1aa19fee14d63c7b3433925952b
Author: Morten Welinder <terra gnome org>
Date: Fri Aug 20 11:37:36 2010 -0400
go_range_increasing, go_range_decreasing: Add preconditions.
ChangeLog | 5 +++++
goffice/math/go-rangefunc.c | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 19c2e6b..931d29b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-20 Morten Welinder <terra gnome org>
+
+ * goffice/math/go-rangefunc.c (go_range_increasing)
+ (go_range_decreasing): Add preconditions.
+
2010-08-19 Jean Brefort <jean brefort normalesup org>
* plugins/plot_surface/gog-xyz-surface.c
diff --git a/goffice/math/go-rangefunc.c b/goffice/math/go-rangefunc.c
index a9239b7..8558234 100644
--- a/goffice/math/go-rangefunc.c
+++ b/goffice/math/go-rangefunc.c
@@ -249,6 +249,7 @@ int
SUFFIX(go_range_increasing) (DOUBLE const *xs, int n)
{
int i;
+ g_return_val_if_fail (n == 0 || xs != NULL, 0);
for (i = 1; i < n; i++)
if (xs[i - 1] >= xs[i])
return 0;
@@ -259,6 +260,7 @@ int
SUFFIX(go_range_decreasing) (DOUBLE const *xs, int n)
{
int i;
+ g_return_val_if_fail (n == 0 || xs != NULL, 0);
for (i = 1; i < n; i++)
if (xs[i - 1] <= xs[i])
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]