summaryrefslogtreecommitdiff
path: root/libiberty/pex-msdos.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2005-05-24 21:01:33 +0000
committerDJ Delorie <dj@delorie.com>2005-05-24 21:01:33 +0000
commit89c7f9932583efbe420b89437971da682e520b83 (patch)
treed9e972beaab164455b65b67ffd2ca21264c75bd5 /libiberty/pex-msdos.c
parent85805b4389018d6ff9416825b7830d3d807ab34e (diff)
downloadgdb-89c7f9932583efbe420b89437971da682e520b83.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/pex-msdos.c')
-rw-r--r--libiberty/pex-msdos.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libiberty/pex-msdos.c b/libiberty/pex-msdos.c
index a7cc820a82a..2256117d1bb 100644
--- a/libiberty/pex-msdos.c
+++ b/libiberty/pex-msdos.c
@@ -89,7 +89,7 @@ pex_init (int flags, const char *pname, const char *tempbase)
ret = pex_init_common (flags, pname, tempbase, funcs);
- ret->sysdep = xmalloc (sizeof (struct pex_msdos));
+ ret->sysdep = XNEW (struct pex_msdos);
for (i = 0; i < PEX_MSDOS_FILE_COUNT; ++i)
ret->files[i] = NULL;
ret->statuses = NULL;
@@ -210,7 +210,7 @@ pex_msdos_exec_child (struct pex_obj *obj, int flags, const char *executable,
outfile = ms->files[outindex];
}
- scmd = xmalloc (strlen (program)
+ scmd = XNEWVEC (char, strlen (program)
+ ((flags & PEXECUTE_SEARCH) != 0 ? 4 : 0)
+ strlen (rf)
+ strlen (infile)
@@ -269,7 +269,7 @@ pex_msdos_exec_child (struct pex_obj *obj, int flags, const char *executable,
/* Save the exit status for later. When we are called, obj->count
is the number of children which have executed before this
one. */
- ms->statuses = xrealloc (ms->statuses, (obj->count + 1) * sizeof (int));
+ ms->statuses = XRESIZEVEC(int, ms->statuses, obj->count + 1);
ms->statuses[obj->count] = status;
return obj->count;