From: John Darrington Date: Tue, 15 Nov 2011 14:20:59 +0000 (+0100) Subject: sweep.c: Move repeated call out of if ... else X-Git-Tag: v0.7.9~87 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=90afc1f0572a82bd6eb4532350b368c685b3cc7b;p=pspp-builds.git sweep.c: Move repeated call out of if ... else This line is identical for all cases, so it only needs to appear once. --- diff --git a/lib/linreg/sweep.c b/lib/linreg/sweep.c index c2184564..7667e3a5 100644 --- a/lib/linreg/sweep.c +++ b/lib/linreg/sweep.c @@ -106,20 +106,18 @@ reg_sweep (gsl_matrix * A, int last_col) tmp = gsl_matrix_get (A, i, j) - gsl_matrix_get (A, i, k) * gsl_matrix_get (A, j, k) / sweep_element; - gsl_matrix_set (B, i, j, tmp); } else if (j > k) { tmp = gsl_matrix_get (A, i, j) - gsl_matrix_get (A, i, k) * gsl_matrix_get (A, k, j) / sweep_element; - gsl_matrix_set (B, i, j, tmp); } else { tmp = gsl_matrix_get (A, i, k) / sweep_element; - gsl_matrix_set (B, i, j, tmp); } + gsl_matrix_set (B, i, j, tmp); } } /*