summaryrefslogtreecommitdiff
path: root/libiberty/dyn-string.c
diff options
context:
space:
mode:
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 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
}