static struct rand_off *ncb_generate_rand_off(const struct ncbuf *buf)
{
struct rand_off *roff;
- roff = calloc(1, sizeof(struct rand_off));
+ roff = calloc(1, sizeof(*roff));
BUG_ON(!roff);
roff->off = rand() % (ncb_size(buf));
{
int i;
- quic_dghdlrs = calloc(global.nbthread, sizeof(struct quic_dghdlr));
+ quic_dghdlrs = calloc(global.nbthread, sizeof(*quic_dghdlrs));
if (!quic_dghdlrs) {
ha_alert("Failed to allocate the quic datagram handlers.\n");
return 0;
{
int i;
- quic_accept_queues = calloc(global.nbthread, sizeof(struct quic_accept_queue));
+ quic_accept_queues = calloc(global.nbthread,
+ sizeof(*quic_accept_queues));
if (!quic_accept_queues) {
ha_alert("Failed to allocate the quic accept queues.\n");
return 0;