X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcategoricals.c;h=83326c3f006789814c4930feed8d85d15db95155;hb=7b7d1e6fbf05cf190814b1f64d8ee363203d7499;hp=4e6d8dad7ad942c633c7dc79820b93bc43d01ea6;hpb=7919fa5fc1f94ad0097507d20e2deea52ed06df8;p=pspp diff --git a/src/math/categoricals.c b/src/math/categoricals.c index 4e6d8dad7a..83326c3f00 100644 --- a/src/math/categoricals.c +++ b/src/math/categoricals.c @@ -323,7 +323,7 @@ struct categoricals * categoricals_create (struct interaction *const *inter, size_t n_inter, const struct variable *wv, enum mv_class fctr_excl) { - struct categoricals *cat = xzalloc (sizeof *cat); + struct categoricals *cat = XZALLOC (struct categoricals); cat->iap = pool_calloc (cat->pool, n_inter, sizeof *cat->iap); cat->n_iap = n_inter; cat->wv = wv; @@ -367,7 +367,7 @@ categoricals_update (struct categoricals *cat, const struct ccase *c) assert (!cat->cat_to_iact); double weight; - weight = cat->wv ? case_data (c, cat->wv)->f : 1.0; + weight = cat->wv ? case_num (c, cat->wv) : 1.0; weight = var_force_valid_weight (cat->wv, weight, NULL); /* Update the frequency table for each variable. */