Beispiel #1
0
static inline unsigned char *zipmapResize(unsigned char *zm, unsigned int len) {
    zm = zrealloc(zm, len);
    zm[len-1] = ZIPMAP_END;
    return zm;
}
Beispiel #2
0
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;
}
Beispiel #3
0
static int aeApiResize(aeEventLoop *eventLoop, int setsize) {
    aeApiState *state = eventLoop->apidata;

    state->events = zrealloc(state->events, sizeof(struct epoll_event)*setsize);
    return 0;
}