[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/math/linreg linreg.c ChangeLog
From: |
Jason H Stover |
Subject: |
[Pspp-cvs] pspp/src/math/linreg linreg.c ChangeLog |
Date: |
Sat, 08 Mar 2008 18:58:58 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Changes by: Jason H Stover <jstover> 08/03/08 18:58:58
Modified files:
src/math/linreg: linreg.c ChangeLog
Log message:
Fix bug 22419
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/linreg/linreg.c?cvsroot=pspp&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/linreg/ChangeLog?cvsroot=pspp&r1=1.19&r2=1.20
Patches:
Index: linreg.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/linreg/linreg.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- linreg.c 4 Dec 2007 04:22:25 -0000 1.26
+++ linreg.c 8 Mar 2008 18:58:58 -0000 1.27
@@ -94,9 +94,9 @@
pspp_linreg_get_vars (const void *c_, const struct variable **v)
{
const pspp_linreg_cache *c = c_;
- struct pspp_coeff *coef = NULL;
const struct variable *tmp;
int i;
+ int j;
int result = 0;
/*
@@ -110,12 +110,9 @@
/*
Start at c->coeff[1] to avoid the intercept.
*/
- v[result] = pspp_coeff_get_var (c->coeff[1], 0);
- result = (v[result] == NULL) ? 0 : 1;
-
- for (coef = c->coeff[2]; coef < c->coeff[c->n_coeffs]; coef++)
+ for (j = 1; j < c->n_coeffs; j++)
{
- tmp = pspp_coeff_get_var (coef, 0);
+ tmp = pspp_coeff_get_var (c->coeff[j], 0);
assert (tmp != NULL);
/* Repeated variables are likely to bunch together, at the end
of the array. */
Index: ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/math/linreg/ChangeLog,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- ChangeLog 29 Feb 2008 02:22:48 -0000 1.19
+++ ChangeLog 8 Mar 2008 18:58:58 -0000 1.20
@@ -1,3 +1,8 @@
+2008-03-08 Jason Stover <address@hidden>
+
+ * linreg.c (pspp_linreg_get_vars): Clean up the loop that searches
+ for coefficient/variable matches. Fix for bug 22419.
+
2008-02-28 Jason Stover <address@hidden>
* linreg.c (has_coefficient): New function.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src/math/linreg linreg.c ChangeLog,
Jason H Stover <=