Changed int to bool in dict_get_weight and sort_active_file_in_place
[pspp-builds.git] / src / data / dictionary.c
index 16809032c23e1a3d386764214d7038793e3c3e66..a7ba0274aec8280d9d2a71c86329d20cee8bb375 100644 (file)
@@ -687,11 +687,11 @@ dict_get_weight (const struct dictionary *d)
 /* Returns the value of D's weighting variable in case C, except that a
    negative weight is returned as 0.  Returns 1 if the dictionary is
    unweighted. Will warn about missing, negative, or zero values if
-   warn_on_invalid is nonzero. The function will set warn_on_invalid to zero
+   warn_on_invalid is true. The function will set warn_on_invalid to false
    if an invalid weight is found. */
 double
 dict_get_case_weight (const struct dictionary *d, const struct ccase *c, 
-                     int *warn_on_invalid)
+                     bool *warn_on_invalid)
 {
   assert (d != NULL);
   assert (c != NULL);
@@ -704,7 +704,7 @@ dict_get_case_weight (const struct dictionary *d, const struct ccase *c,
       if (w < 0.0 || mv_is_num_missing (&d->weight->miss, w))
         w = 0.0;
       if ( w == 0.0 && *warn_on_invalid ) {
-         *warn_on_invalid = 0;
+         *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."));