Date: Wed, 9 Nov 2011 11:21:10 -0500 From: Ryan Stone <rysto32@gmail.com> To: Brooks Davis <brooks@freebsd.org> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: [PATCH] Allow syslogd to accept multiple configuration files Message-ID: <CAFMmRNxJBMQjbTWb__SeMjLptFXoz4eLARO=Jq_ib8gtKgDSuA@mail.gmail.com> In-Reply-To: <20111109160158.GA55645@lor.one-eyed-alien.net> References: <CAFMmRNx9z4TFdJAjcg7evj17n1w6VrNuh_gjWLgcwnfn3U0__Q@mail.gmail.com> <20111109160158.GA55645@lor.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 9, 2011 at 11:01 AM, Brooks Davis <brooks@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).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNxJBMQjbTWb__SeMjLptFXoz4eLARO=Jq_ib8gtKgDSuA>