diff options
author | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
commit | abf6a75b428517d9caaf9155212b0b10e0379a99 (patch) | |
tree | 3476694dba1d2c731deb2a131b0d8d6c5dcb0cd3 /libiberty/pex-common.c | |
parent | f127898a4db12540b9898e25777c6c3725d119bf (diff) | |
download | gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.zip gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.gz gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/pex-common.c')
-rw-r--r-- | libiberty/pex-common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libiberty/pex-common.c b/libiberty/pex-common.c index 615cfbc..b2ca6e0 100644 --- a/libiberty/pex-common.c +++ b/libiberty/pex-common.c @@ -55,7 +55,7 @@ pex_init_common (int flags, const char *pname, const char *tempbase, { struct pex_obj *obj; - obj = xmalloc (sizeof (*obj)); + obj = XNEW (struct pex_obj); obj->flags = flags; obj->pname = pname; obj->tempbase = tempbase; @@ -83,7 +83,7 @@ pex_add_remove (struct pex_obj *obj, const char *name, int allocated) char *add; ++obj->remove_count; - obj->remove = xrealloc (obj->remove, obj->remove_count * sizeof (char *)); + obj->remove = XRESIZEVEC (char *, obj->remove, obj->remove_count); if (allocated) add = (char *) name; else @@ -280,7 +280,7 @@ pex_run (struct pex_obj *obj, int flags, const char *executable, goto error_exit; ++obj->count; - obj->children = xrealloc (obj->children, obj->count * sizeof (long)); + obj->children = XRESIZEVEC (long, obj->children, obj->count); obj->children[obj->count - 1] = pid; return NULL; @@ -352,9 +352,9 @@ pex_get_status_and_time (struct pex_obj *obj, int done, const char **errmsg, if (obj->number_waited == obj->count) return 1; - obj->status = xrealloc (obj->status, obj->count * sizeof (int)); + obj->status = XRESIZEVEC (int, obj->status, obj->count); if ((obj->flags & PEX_RECORD_TIMES) != 0) - obj->time = xrealloc (obj->time, obj->count * sizeof (struct pex_time)); + obj->time = XRESIZEVEC (struct pex_time, obj->time, obj->count); ret = 1; for (i = obj->number_waited; i < obj->count; ++i) |