diff options
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index a8e962ea50..99ec0a39bd 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -618,6 +618,8 @@ char *strextend(char **x, ...); char *strrep(const char *s, unsigned n); void* greedy_realloc(void **p, size_t *allocated, size_t need); +#define GREEDY_REALLOC(array, allocated, need) \ + greedy_realloc((void**) &(array), &(allocated), (sizeof *array) * (need)) static inline void _reset_errno_(int *saved_errno) { errno = *saved_errno; |