X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fmoments.c;h=3c5e3840207b1f76d5bf15dbc5c5715c4221f9d2;hb=6d2a8977cc6a54e9e2278467f2af3d5ae277cd43;hp=4bafb0515781095521a1d15efd998f8c78e2b22e;hpb=4fdeb2145d081ff1b84e3f6c99f9d1c048c0d64a;p=pspp diff --git a/src/moments.c b/src/moments.c index 4bafb05157..3c5e384020 100644 --- a/src/moments.c +++ b/src/moments.c @@ -25,6 +25,9 @@ #include "alloc.h" #include "misc.h" #include "val.h" + +#include "gettext.h" +#define _(msgid) gettext (msgid) /* Calculates variance, skewness, and kurtosis into *VARIANCE, *SKEWNESS, and *KURTOSIS if they are non-null and not greater @@ -520,8 +523,8 @@ read_values (double **values, double **weights, size_t *cnt) if (*cnt >= cap) { cap = 2 * (cap + 8); - *values = xrealloc (*values, sizeof **values * cap); - *weights = xrealloc (*weights, sizeof **weights * cap); + *values = xnrealloc (*values, cap, sizeof **values); + *weights = xnrealloc (*weights, cap, sizeof **weights); } (*values)[*cnt] = value;