From c2b3ae36d499a4e66af4549410c1f29e6323565d Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 10 Sep 2024 08:37:52 +0000 Subject: [PATCH] Use reallocarray() instead of recallocarray(), this code does not need the extra security measures of recallocarray() which adds a lot of overhead. OK tb@ --- usr.sbin/bgpd/rtr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bgpd/rtr.c b/usr.sbin/bgpd/rtr.c index 4ea5aa931dd..94bed64ea7d 100644 --- a/usr.sbin/bgpd/rtr.c +++ b/usr.sbin/bgpd/rtr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtr.c,v 1.22 2024/08/12 09:04:23 claudio Exp $ */ +/* $OpenBSD: rtr.c,v 1.23 2024/09/10 08:37:52 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker @@ -143,7 +143,7 @@ aspa_set_entry(struct aspa_set *aspa, uint32_t asnum) } num = aspa->num + 1; - newtas = recallocarray(aspa->tas, aspa->num, num, sizeof(uint32_t)); + newtas = reallocarray(aspa->tas, num, sizeof(uint32_t)); if (newtas == NULL) fatal("aspa_set merge"); -- 2.20.1