diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-09 02:43:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-09 02:43:44 +0000 |
commit | 39d0172354f1ecf1c05e5b57099a68480413241e (patch) | |
tree | 740524fe1113c8b7582e07aa3b4577e915fb11e6 /libexec/spamd/grey.c | |
parent | 49f18132a4f68ac756c5b569969adebe112bd756 (diff) |
obvious reallocarray() conversions
Diffstat (limited to 'libexec/spamd/grey.c')
-rw-r--r-- | libexec/spamd/grey.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c index f085832b598..d4715d5cd9a 100644 --- a/libexec/spamd/grey.c +++ b/libexec/spamd/grey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grey.c,v 1.55 2013/11/27 21:25:25 deraadt Exp $ */ +/* $OpenBSD: grey.c,v 1.56 2014/10/09 02:43:43 deraadt Exp $ */ /* * Copyright (c) 2004-2006 Bob Beck. All rights reserved. @@ -413,8 +413,8 @@ addwhiteaddr(char *addr) if (whitecount == whitealloc) { char **tmp; - tmp = realloc(whitelist, - (whitealloc + 1024) * sizeof(char *)); + tmp = reallocarray(whitelist, + whitealloc + 1024, sizeof(char *)); if (tmp == NULL) { freeaddrinfo(res); return(-1); @@ -450,8 +450,8 @@ addtrapaddr(char *addr) if (trapcount == trapalloc) { char **tmp; - tmp = realloc(traplist, - (trapalloc + 1024) * sizeof(char *)); + tmp = reallocarray(traplist, + trapalloc + 1024, sizeof(char *)); if (tmp == NULL) { freeaddrinfo(res); return(-1); @@ -610,7 +610,7 @@ greyscan(char *dbname) if (asiz < dbk.size + 1) { char *tmp; - tmp = realloc(a, dbk.size * 2); + tmp = reallocarray(a, dbk.size, 2); if (tmp == NULL) goto bad; a = tmp; |