Re: [PATCH] Allow syslogd to accept multiple configuration files

From: Ryan Stone <rysto32_at_gmail.com>
Date: Wed, 9 Nov 2011 11:21:10 -0500
On Wed, Nov 9, 2011 at 11:01 AM, Brooks Davis <brooks_at_freebsd.org> wrote:
> Do you happen to know why the code calloc's the struct filed's with 1's?
> I didn't do any investigation but that's seems like an odd pattern.

calloc(1, sizeof(*f)) returns an array of 1 element of size sizeof(*f)
that is pre-zeroed.  It's the userland equivalent of
malloc(sizeof(*f), ..., M_ZERO).
Received on Wed Nov 09 2011 - 15:21:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:20 UTC