diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-11 04:14:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-11 04:14:36 +0000 |
commit | 6da3582fc226f92643fec4637036640505cc2b91 (patch) | |
tree | 901d8d48830ce3357fcd3965c39d3e59efc66721 /lib | |
parent | ccc045738228a1c3424fa0f8216bcef12ed67a50 (diff) |
obvious reallocarray() use
ok doug
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/setmode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c index 3231d065ad5..ce241d20bc5 100644 --- a/lib/libc/gen/setmode.c +++ b/lib/libc/gen/setmode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setmode.c,v 1.21 2013/11/24 23:51:29 deraadt Exp $ */ +/* $OpenBSD: setmode.c,v 1.22 2014/10/11 04:14:35 deraadt Exp $ */ /* $NetBSD: setmode.c,v 1.15 1997/02/07 22:21:06 christos Exp $ */ /* @@ -145,7 +145,7 @@ common: if (set->cmd2 & CMD2_CLR) { if (set >= endset) { \ BITCMD *newset; \ setlen += SET_LEN_INCR; \ - newset = realloc(saveset, sizeof(BITCMD) * setlen); \ + newset = reallocarray(saveset, setlen, sizeof(BITCMD)); \ if (newset == NULL) { \ free(saveset); \ return (NULL); \ |