diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-09-02 23:50:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-09-02 23:50:05 +0000 |
commit | 03059e279945b4acbfbc6fc65c70c7d1ba77bb55 (patch) | |
tree | 105f0ad8a4c221d0b5cf3ab631a67266dc8fa22b /sbin/isakmpd/exchange.c | |
parent | 34bab3a7fcc73c4a4de55b918cebcbbcc95ff927 (diff) |
more malloc(n * m) -> calloc(n, m); from Igor Zinovik
Diffstat (limited to 'sbin/isakmpd/exchange.c')
-rw-r--r-- | sbin/isakmpd/exchange.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index 39d6242d790..27f71a1aa6c 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exchange.c,v 1.131 2007/08/05 09:43:09 tom Exp $ */ +/* $OpenBSD: exchange.c,v 1.132 2007/09/02 23:50:04 deraadt Exp $ */ /* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */ /* @@ -411,8 +411,7 @@ exchange_init(void) int i; bucket_mask = (1 << INITIAL_BUCKET_BITS) - 1; - exchange_tab = malloc((bucket_mask + 1) * - sizeof(struct exchange_list)); + exchange_tab = calloc(bucket_mask + 1, sizeof(struct exchange_list)); if (!exchange_tab) log_fatal("exchange_init: out of memory"); for (i = 0; i <= bucket_mask; i++) |