X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffrequencies.q;h=66faf5ef027e2608914a0a9b2927bedbe5831ee7;hb=77cbf2d7d1e5712d4ef952f265ed5c2917fc3f68;hp=44393a89bbe765ad473afaa63a1af1a4cc72a9f5;hpb=6f972e0ef93c3a7e00fd5335ea22af2c878f4589;p=pspp diff --git a/src/frequencies.q b/src/frequencies.q index 44393a89bb..66faf5ef02 100644 --- a/src/frequencies.q +++ b/src/frequencies.q @@ -518,6 +518,8 @@ get_freq_comparator (int frq_sort, int var_type) return 0; } +/* Returns nonzero iff the value in struct freq F is non-missing + for variable V. */ static int not_missing (const void *f_, void *v_) { @@ -527,8 +529,9 @@ not_missing (const void *f_, void *v_) return !is_missing (&f->v, v); } +/* Summarizes the frequency table data for variable V. */ static void -postprocess_freq_tab (struct variable * v) +postprocess_freq_tab (struct variable *v) { hsh_compare_func *compare; struct freq_tab *ft; @@ -575,11 +578,13 @@ postprocess_freq_tab (struct variable * v) } } +/* Frees the frequency table for variable V. */ static void cleanup_freq_tab (struct variable *v) { assert (v->p.frq.tab.mode == FRQM_GENERAL); free (v->p.frq.tab.valid); + hsh_destroy (v->p.frq.tab.data); } /* Parses the VARIABLES subcommand, adding to @@ -588,7 +593,7 @@ static int frq_custom_variables (struct cmd_frequencies *cmd UNUSED) { int mode; - int min, max; + int min = 0, max = 0; int old_n_variables = n_variables; int i; @@ -715,8 +720,11 @@ frq_custom_grouped (struct cmd_frequencies *cmd UNUSED) return 0; } } - else - nl = 0; + else + { + nl = 0; + dl = NULL; + } for (i = 0; i < n; i++) {