Beginning of VFM cleanup.
[pspp] / src / frequencies.q
index 850beda2bc495d22a7a29dd516e3165892359da8..0d896b4711f3a6f2f7f9db6ccc67a5da7eff191b 100644 (file)
@@ -580,6 +580,7 @@ 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
@@ -889,9 +890,9 @@ compare_freq_numeric_a (const void *a_, const void *b_, void *foo UNUSED)
   const struct freq *a = a_;
   const struct freq *b = b_;
 
-  if (a->v.c > b->v.c)
+  if (a->c > b->c)
     return 1;
-  else if (a->v.c < b->v.c)
+  else if (a->c < b->c)
     return -1;
 
   if (a->v.f > b->v.f)
@@ -911,9 +912,9 @@ compare_freq_alpha_a (const void *a_, const void *b_, void *v_)
   const struct freq *b = b_;
   const struct variable *v = v_;
 
-  if (a->v.c > b->v.c)
+  if (a->c > b->c)
     return 1;
-  else if (a->v.c < b->v.c)
+  else if (a->c < b->c)
     return -1;
   else
     return memcmp (a->v.s, b->v.s, v->width);
@@ -927,9 +928,9 @@ compare_freq_numeric_d (const void *a_, const void *b_, void *foo UNUSED)
   const struct freq *a = a_;
   const struct freq *b = b_;
 
-  if (a->v.c > b->v.c)
+  if (a->c > b->c)
     return -1;
-  else if (a->v.c < b->v.c)
+  else if (a->c < b->c)
     return 1;
 
   if (a->v.f > b->v.f)
@@ -949,9 +950,9 @@ compare_freq_alpha_d (const void *a_, const void *b_, void *v_)
   const struct freq *b = b_;
   const struct variable *v = v_;
 
-  if (a->v.c > b->v.c)
+  if (a->c > b->c)
     return -1;
-  else if (a->v.c < b->v.c)
+  else if (a->c < b->c)
     return 1;
   else
     return memcmp (a->v.s, b->v.s, v->width);