aboutsummaryrefslogtreecommitdiff
path: root/libiberty/dyn-string.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/dyn-string.c
parentf127898a4db12540b9898e25777c6c3725d119bf (diff)
downloadgdb-abf6a75b428517d9caaf9155212b0b10e0379a99.zip
gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.gz
gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/dyn-string.c')
-rw-r--r--libiberty/dyn-string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libiberty/dyn-string.c b/libiberty/dyn-string.c
index 2cfbd4b..9de50ed 100644
--- a/libiberty/dyn-string.c
+++ b/libiberty/dyn-string.c
@@ -67,7 +67,7 @@ dyn_string_init (struct dyn_string *ds_struct_ptr, int space)
if (ds_struct_ptr->s == NULL)
return 0;
#else
- ds_struct_ptr->s = (char *) xmalloc (space);
+ ds_struct_ptr->s = XNEWVEC (char, space);
#endif
ds_struct_ptr->allocated = space;
ds_struct_ptr->length = 0;
@@ -96,7 +96,7 @@ dyn_string_new (int space)
return NULL;
}
#else
- result = (dyn_string_t) xmalloc (sizeof (struct dyn_string));
+ result = XNEW (struct dyn_string);
dyn_string_init (result, space);
#endif
return result;
@@ -159,7 +159,7 @@ dyn_string_resize (dyn_string_t ds, int space)
return NULL;
}
#else
- ds->s = (char *) xrealloc (ds->s, ds->allocated);
+ ds->s = XRESIZEVEC (char, ds->s, ds->allocated);
#endif
}