summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd/ntp_restrict.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpd/ntp_restrict.c')
-rw-r--r--contrib/ntp/ntpd/ntp_restrict.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/ntp/ntpd/ntp_restrict.c b/contrib/ntp/ntpd/ntp_restrict.c
index 0b5fa2e..ad6c82a 100644
--- a/contrib/ntp/ntpd/ntp_restrict.c
+++ b/contrib/ntp/ntpd/ntp_restrict.c
@@ -166,7 +166,7 @@ alloc_res4(void)
if (res != NULL)
return res;
- rl = emalloc_zero(count * cb);
+ rl = eallocarray(count, cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
for (i = count - 1; i > 0; i--) {
@@ -192,7 +192,7 @@ alloc_res6(void)
if (res != NULL)
return res;
- rl = emalloc_zero(count * cb);
+ rl = eallocarray(count, cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
for (i = count - 1; i > 0; i--) {
OpenPOWER on IntegriCloud