[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/repeat.c
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] Changes to pspp/src/repeat.c |
Date: |
Wed, 26 Oct 2005 01:07:39 -0400 |
Index: pspp/src/repeat.c
diff -u pspp/src/repeat.c:1.19 pspp/src/repeat.c:1.20
--- pspp/src/repeat.c:1.19 Tue Oct 25 04:28:17 2005
+++ pspp/src/repeat.c Wed Oct 26 05:06:14 2005
@@ -355,8 +355,8 @@
if (!parse_mixed_vars (&names, &nnames, PV_NONE))
return 0;
- e->replacement = xrealloc (e->replacement,
- (nnames + n) * sizeof *e->replacement);
+ e->replacement = xnrealloc (e->replacement,
+ nnames + n, sizeof *e->replacement);
for (i = 0; i < nnames; i++)
{
e->replacement[n + i] = xstrdup (names[i]);
@@ -418,8 +418,8 @@
if (n + (abs (b - a) + 1) > m)
{
m = n + (abs (b - a) + 1) + 16;
- e->replacement = array = xrealloc (array,
- m * sizeof *e->replacement);
+ e->replacement = array = xnrealloc (array,
+ m, sizeof *e->replacement);
}
if (a == b)
@@ -470,8 +470,8 @@
if (n + 1 > m)
{
m += 16;
- e->replacement = string = xrealloc (string,
- m * sizeof *e->replacement);
+ e->replacement = string = xnrealloc (string,
+ m, sizeof *e->replacement);
}
string[n++] = lex_token_representation ();
lex_get ();
@@ -479,7 +479,7 @@
lex_match (',');
}
while (token != '/' && token != '.');
- e->replacement = xrealloc (string, n * sizeof *e->replacement);
+ e->replacement = xnrealloc (string, n, sizeof *e->replacement);
return n;
}