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
commitcf3e417217878eda27dbf11a1fc8051bbe329648 (patch)
treea8edbdff8932f8c03ae76964a3cb541e21da134c /libiberty/pex-msdos.c
parent4bb30907acdef3f90a7cdf602c85dae7c771058b (diff)
downloadbinutils-redhat-cf3e417217878eda27dbf11a1fc8051bbe329648.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 a7cc820a82..2256117d1b 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;