#ifndef GARRAY_H
#define GARRAY_H
-/* $OpenBSD: garray.h,v 1.6 2010/07/19 19:46:44 espie Exp $ */
+/* $OpenBSD: garray.h,v 1.7 2014/04/22 08:26:31 espie Exp $ */
/* Growable array implementation */
/*
do { \
if ((l)->n >= (l)->size) { \
(l)->size *= 2; \
- (l)->a = erealloc((l)->a, \
- sizeof(struct GNode *) * (l)->size);\
+ (l)->a = emult_realloc((l)->a, \
+ (l)->size, sizeof(struct GNode *)); \
MAY_INCREASE_STATS; \
} \
(l)->a[(l)->n++] = (gn); \
-/* $OpenBSD: str.c,v 1.28 2013/11/22 15:47:35 espie Exp $ */
+/* $OpenBSD: str.c,v 1.29 2014/04/22 08:26:31 espie Exp $ */
/* $NetBSD: str.c,v 1.13 1996/11/06 17:59:23 christos Exp $ */
/*-
*t++ = '\0';
if (argc == argmax) {
argmax *= 2; /* ramp up fast */
- argv = erealloc(argv,
- (argmax + 1) * sizeof(char *));
+ argv = emult_realloc(argv,
+ (argmax + 1), sizeof(char *));
}
argv[argc++] = start;
start = NULL;
-/* $OpenBSD: varmodifiers.c,v 1.35 2013/11/22 15:47:35 espie Exp $ */
+/* $OpenBSD: varmodifiers.c,v 1.36 2014/04/22 08:26:31 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
const char *start, *end;
n = 1024; /* start at 1024 words */
- t = (struct Name *)emalloc(sizeof(struct Name) * n);
+ t = ecalloc(n, sizeof(struct Name));
start = s;
end = start;
for (i = 0;; i++) {
if (i == n) {
n *= 2;
- t = (struct Name *)erealloc(t, sizeof(struct Name) * n);
+ t = emult_realloc(t, n, sizeof(struct Name));
}
start = iterate_words(&end);
if (start == NULL)