OPTIM: pattern: use malloc() to initialize new pat_ref struct
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 7 Nov 2024 09:05:30 +0000 (10:05 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 7 Nov 2024 10:36:08 +0000 (11:36 +0100)
commite8a0dbff93bf6e2b7264d4b34c37a6d287060e63
treecdcee802a0d46033dccfc20bf5419db6031242c6
parentd1397401f04b4f920b1d545912f96d9f67c23daf
OPTIM: pattern: use malloc() to initialize new pat_ref struct

As mentioned in the previous commit, in _pat_ref_new(), it was not
strictly needed to explicitly assign all struct members to 0 since
the struct was allocated with calloc() which does the zeroing for us.

However, it was verified that we already initialize all fields explictly,
thus there is no reason to keep using calloc() instead of malloc(). In
fact using malloc() is less expensive, so let's use that instead now.
src/pattern.c