/* sb.c - string buffer manipulation routines
- Copyright (C) 1994-2015 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
void
sb_build (sb *ptr, size_t size)
{
- ptr->ptr = xmalloc (size + 1);
+ ptr->ptr = XNEWVEC (char, size + 1);
ptr->max = size;
ptr->len = 0;
}
#endif
max -= MALLOC_OVERHEAD + 1;
ptr->max = max;
- ptr->ptr = xrealloc (ptr->ptr, max + 1);
+ ptr->ptr = XRESIZEVEC (char, ptr->ptr, max + 1);
}
}