Add xreallocarray and remove nmemb argument from xrealloc.

This commit is contained in:
nicm
2014-10-08 17:35:58 +00:00
parent 77efcf8bdd
commit a27ba6e380
17 changed files with 65 additions and 48 deletions

View File

@ -909,7 +909,7 @@ input_ground(struct input_ctx *ictx)
if (ictx->input_space > INPUT_BUF_START) {
ictx->input_space = INPUT_BUF_START;
ictx->input_buf = xrealloc(ictx->input_buf, 1, INPUT_BUF_START);
ictx->input_buf = xrealloc(ictx->input_buf, INPUT_BUF_START);
}
}
@ -974,7 +974,7 @@ input_input(struct input_ctx *ictx)
ictx->flags |= INPUT_DISCARD;
return (0);
}
ictx->input_buf = xrealloc(ictx->input_buf, 1, available);
ictx->input_buf = xrealloc(ictx->input_buf, available);
ictx->input_space = available;
}
ictx->input_buf[ictx->input_len++] = ictx->ch;