aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-msdos.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-05-24 21:01:33 +0000
committerDJ Delorie <dj@redhat.com>2005-05-24 21:01:33 +0000
commitabf6a75b428517d9caaf9155212b0b10e0379a99 (patch)
tree3476694dba1d2c731deb2a131b0d8d6c5dcb0cd3 /libiberty/pex-msdos.c
parentf127898a4db12540b9898e25777c6c3725d119bf (diff)
downloadfsf-binutils-gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.zip
fsf-binutils-gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.gz
fsf-binutils-gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.bz2
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 a7cc820..2256117 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;