pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/frequencies.q


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/frequencies.q
Date: Sat, 29 Oct 2005 01:50:07 -0400

Index: pspp/src/frequencies.q
diff -u pspp/src/frequencies.q:1.41 pspp/src/frequencies.q:1.42
--- pspp/src/frequencies.q:1.41 Wed Oct 26 05:06:14 2005
+++ pspp/src/frequencies.q      Sat Oct 29 05:50:06 2005
@@ -835,8 +835,8 @@
        {
          vf->tab.min = min;
          vf->tab.max = max;
-         vf->tab.vector = pool_alloc (int_pool,
-                                       sizeof (struct freq) * (max - min + 1));
+         vf->tab.vector = pool_nalloc (int_pool,
+                                        max - min + 1, sizeof *vf->tab.vector);
        }
       else
        vf->tab.vector = NULL;
@@ -878,7 +878,7 @@
                if (nl >= ml)
                  {
                    ml += 16;
-                   dl = pool_realloc (int_pool, dl, ml * sizeof (double));
+                   dl = pool_nrealloc (int_pool, dl, ml, sizeof *dl);
                  }
                dl[nl++] = tokval;
                lex_get ();
@@ -949,9 +949,8 @@
 
   if (i >= n_percentiles || tokval != percentiles[i].p)
     {
-      percentiles
-        = pool_realloc (int_pool, percentiles,
-                        (n_percentiles + 1) * sizeof (struct percentile ));
+      percentiles = pool_nrealloc (int_pool, percentiles,
+                                   n_percentiles + 1, sizeof *percentiles);
 
       if (i < n_percentiles)
           memmove (&percentiles[i + 1], &percentiles[i],




reply via email to

[Prev in Thread] Current Thread [Next in Thread]