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

@ -215,8 +215,8 @@ screen_resize_y(struct screen *s, u_int sy)
}
/* Resize line arrays. */
gd->linedata = xrealloc(
gd->linedata, gd->hsize + sy, sizeof *gd->linedata);
gd->linedata = xreallocarray(gd->linedata, gd->hsize + sy,
sizeof *gd->linedata);
/* Size increasing. */
if (sy > oldy) {