[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/math/linreg coefficient.c
From: |
Jason H Stover |
Subject: |
[Pspp-cvs] pspp/src/math/linreg coefficient.c |
Date: |
Fri, 07 Apr 2006 20:02:27 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Branch:
Changes by: Jason H Stover <address@hidden> 06/04/07 20:02:27
Modified files:
src/math/linreg: coefficient.c
Log message:
fixed null pointer checking
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/math/linreg/coefficient.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: pspp/src/math/linreg/coefficient.c
diff -u pspp/src/math/linreg/coefficient.c:1.5
pspp/src/math/linreg/coefficient.c:1.6
--- pspp/src/math/linreg/coefficient.c:1.5 Fri Apr 7 19:37:13 2006
+++ pspp/src/math/linreg/coefficient.c Fri Apr 7 20:02:27 2006
@@ -188,11 +188,14 @@
struct pspp_linreg_coeff *result;
const struct variable *tmp;
- if (c == NULL || c->coeff == NULL || c->n_indeps == NULL || v == NULL)
+ if (c == NULL)
+ {
+ return NULL;
+ }
+ if ( c->coeff == NULL || c->n_indeps == NULL || v == NULL)
{
return NULL;
}
-
result = c->coeff + i;
tmp = pspp_linreg_coeff_get_var (result, 0);
while (tmp->index != v->index && i < c->n_coeffs)