BUILD: address a few remaining calloc(size, n) cases
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Feb 2024 10:35:07 +0000 (11:35 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 14 Feb 2024 15:39:46 +0000 (16:39 +0100)
commite0267158f01a593bf9b35ceef2adf1929f46938b
tree1b5bdc6aa708020cb944166c2601c815afb8aae7
parentf29e57b7da9d568d851ecf15d973a36e3c91e2e1
BUILD: address a few remaining calloc(size, n) cases

In issue #2427 Ilya reports that gcc-14 rightfully complains about
sizeof() being placed in the left term of calloc(). There's no impact
but it's a bad pattern that gets copy-pasted over time. Let's fix the
few remaining occurrences (debug.c, halog, udp-perturb).

This can be backported to all branches, and the irrelevant parts dropped.

(cherry picked from commit ab8928b9dbbae77602b1cd50b0f7189835df9164)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
admin/halog/halog.c
dev/udp/udp-perturb.c
src/debug.c