X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdictionary.c;h=e50397a156728c343370d97a1cfc8bf4e976a0ac;hb=0cd7c010e3e5c316ef0eb0317fb7f408d164679d;hp=dc748517921363e6483a6918ef8972d2fe8beda4;hpb=ac196658f4fd578201d9feee087b02d95643b08e;p=pspp diff --git a/src/data/dictionary.c b/src/data/dictionary.c index dc74851792..e50397a156 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -1007,15 +1007,8 @@ dict_get_case_weight (const struct dictionary *d, const struct ccase *c, else { double w = case_num (c, d->weight); - if (w < 0.0 || var_is_num_missing (d->weight, w, MV_ANY)) - w = 0.0; - if ( w == 0.0 && warn_on_invalid != NULL && *warn_on_invalid ) { - *warn_on_invalid = false; - msg (SW, _("At least one case in the data file had a weight value " - "that was user-missing, system-missing, zero, or " - "negative. These case(s) were ignored.")); - } - return w; + + return var_force_valid_weight (d->weight, w, warn_on_invalid); } }