X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcoefficient.c;h=f78895f8214e4b70b89668477ac1dfe1abc98fe2;hb=5c3291dc396b795696e94f47780308fd7ace6fc4;hp=2feeedbaa8f2aff28ace93a23cd0a72fd0d43436;hpb=b4fdd51a0bf62800c53c8a805f31ea735d931029;p=pspp-builds.git diff --git a/src/math/coefficient.c b/src/math/coefficient.c index 2feeedba..f78895f8 100644 --- a/src/math/coefficient.c +++ b/src/math/coefficient.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -160,7 +160,7 @@ pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs, size_t i = 0; size_t j = 0; size_t v_idx; - int found = 0; + struct pspp_coeff *result = NULL; if (v != NULL) @@ -185,9 +185,12 @@ pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs, */ if (val != NULL) { + int width = var_get_width (v); + j = i; - while (j < n_coef && compare_values (pspp_coeff_get_value (coefs[j], v), - val, var_get_width (v)) != 0) + while (j < n_coef + && value_compare_3way (pspp_coeff_get_value (coefs[j], v), + val, width) != 0) { j++; }