You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If not,
-write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#include "config.h"
#include "libiberty.h"
{
struct pex_obj *obj;
- obj = xmalloc (sizeof (*obj));
+ obj = XNEW (struct pex_obj);
obj->flags = flags;
obj->pname = pname;
obj->tempbase = tempbase;
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
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;
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)