diff options
author | DJ Delorie <dj@delorie.com> | 2005-05-24 21:01:33 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2005-05-24 21:01:33 +0000 |
commit | 89c7f9932583efbe420b89437971da682e520b83 (patch) | |
tree | d9e972beaab164455b65b67ffd2ca21264c75bd5 /libiberty/dyn-string.c | |
parent | 85805b4389018d6ff9416825b7830d3d807ab34e (diff) | |
download | gdb-89c7f9932583efbe420b89437971da682e520b83.tar.gz |
merge from gcc
Diffstat (limited to 'libiberty/dyn-string.c')
-rw-r--r-- | libiberty/dyn-string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libiberty/dyn-string.c b/libiberty/dyn-string.c index 2cfbd4b7d71..9de50eda0e8 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 } |