X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Flinreg%2Fsweep.c;h=536fb3b02c2215b96a70a1a244d1aaf21f30964d;hb=101250dc9f516758bd9d13f869f1a770d6dd1ca3;hp=1eb466e92105d80c323c18ca9263f54a568746fb;hpb=019d870c9a961108b6b5e762ce968db2e06203a7;p=pspp diff --git a/lib/linreg/sweep.c b/lib/linreg/sweep.c index 1eb466e921..536fb3b02c 100644 --- a/lib/linreg/sweep.c +++ b/lib/linreg/sweep.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2005, 2009 Free Software Foundation, Inc. + Copyright (C) 2005, 2009, 2011 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 @@ -69,22 +69,21 @@ int reg_sweep (gsl_matrix * A, int last_col) { - if (A == NULL) - return GSL_EFAULT; - - if (A->size1 != A->size2) - return GSL_ENOTSQR; - int i; int j; int k; gsl_matrix *B; + if (A == NULL) + return GSL_EFAULT; + + if (A->size1 != A->size2) + return GSL_ENOTSQR; assert (last_col < A->size1); gsl_matrix_swap_rows (A, A->size1 - 1, last_col); gsl_matrix_swap_columns (A, A->size1 - 1 , last_col); - + B = gsl_matrix_alloc (A->size1, A->size2); for (k = 0; k < (A->size1 - 1); k++) {