if (!separator)
return -1;
- tmp = realloc(ctx->vars, (pcount + 1) * sizeof(struct nft_vars));
- if (!tmp)
- return -1;
+ tmp = xrealloc(ctx->vars, (pcount + 1) * sizeof(struct nft_vars));
*separator = '\0';
value = separator + 1;
char **tmp;
int pcount = ctx->num_include_paths;
- tmp = realloc(ctx->include_paths, (pcount + 1) * sizeof(char *));
- if (!tmp)
- return -1;
+ tmp = xrealloc(ctx->include_paths, (pcount + 1) * sizeof(char *));
ctx->include_paths = tmp;
consumed += numbytes;
if (consumed == bufsiz) {
bufsiz *= 2;
- buf = realloc(buf, bufsiz);
+ buf = xrealloc(buf, bufsiz);
}
numbytes = read(STDIN_FILENO, buf + consumed, bufsiz - consumed);
}