static inline unsigned char *zipmapResize(unsigned char *zm, unsigned int len) { zm = zrealloc(zm, len); zm[len-1] = ZIPMAP_END; return zm; }
sds sdsRemoveFreeSpace(sds s) { struct sdshdr *sh = (void*)(s - (sizeof(struct sdshdr))); sh = zrealloc(sh, sizeof(struct sdshdr) + sh->len + 1); sh->free = 0; return sh->buf; }
static int aeApiResize(aeEventLoop *eventLoop, int setsize) { aeApiState *state = eventLoop->apidata; state->events = zrealloc(state->events, sizeof(struct epoll_event)*setsize); return 0; }