X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Ftukey-hinges.c;h=aaf4881afa954e79e2a9b731188572072df1b558;hb=2ba9563cb1fddad9430be0c415dc81456f006281;hp=3e9ea9374eb4198b76d83688234b23de97fc7cf9;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/src/math/tukey-hinges.c b/src/math/tukey-hinges.c index 3e9ea9374e..aaf4881afa 100644 --- a/src/math/tukey-hinges.c +++ b/src/math/tukey-hinges.c @@ -41,7 +41,7 @@ tukey_hinges_calculate (const struct tukey_hinges *th, double hinge[3]) if (a_star[i] < 1) { - if (os->k[i].c_p1 >= 1 ) + if (os->k[i].c_p1 >= 1) { hinge[i] = (1 - a_star[i]) * os->k[i].y + a_star[i] * os->k[i].y_p1; @@ -74,16 +74,16 @@ struct tukey_hinges * tukey_hinges_create (double W, double c_min) { double d; - struct tukey_hinges *th = xzalloc (sizeof (*th)); + struct tukey_hinges *th = XZALLOC (struct tukey_hinges); struct order_stats *os = &th->parent; struct statistic *stat = &os->parent; assert (c_min >= 0); os->n_k = 3; - os->k = xcalloc (sizeof (*os->k), 3); + os->k = xcalloc (3, sizeof (*os->k)); - if ( c_min >= 1.0) + if (c_min >= 1.0) { d = floor ((W + 3) / 2.0) / 2.0;