From owner-freebsd-current@FreeBSD.ORG Wed Nov 9 16:21:12 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FB20106564A for ; Wed, 9 Nov 2011 16:21:12 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A29638FC18 for ; Wed, 9 Nov 2011 16:21:11 +0000 (UTC) Received: by wyg36 with SMTP id 36so2442191wyg.13 for ; Wed, 09 Nov 2011 08:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wDCiLZjgJ+NA5ftILGNlOsgbjfDwjk040uJoEPk0nyE=; b=cezQqdd1Xu/b2ZHxBJOXiRtfka0NVp3UE1hWaaUEV0yWS5fRcQ3pWlET/KjO/iG2J0 SKzhFh3rhkAIPzVmIA1e2tFnXLWYyYoSeD89akLb7Di7Cdsws8A1QOlHnamCuWCx2HJm U3aRARiyzoxjikCWjWTSWbN5HrnFFjN/EnOD0= MIME-Version: 1.0 Received: by 10.180.95.134 with SMTP id dk6mr3518146wib.59.1320855670707; Wed, 09 Nov 2011 08:21:10 -0800 (PST) Received: by 10.180.8.34 with HTTP; Wed, 9 Nov 2011 08:21:10 -0800 (PST) In-Reply-To: <20111109160158.GA55645@lor.one-eyed-alien.net> References: <20111109160158.GA55645@lor.one-eyed-alien.net> Date: Wed, 9 Nov 2011 11:21:10 -0500 Message-ID: From: Ryan Stone To: Brooks Davis Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Current Subject: Re: [PATCH] Allow syslogd to accept multiple configuration files X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2011 16:21:12 -0000 On Wed, Nov 9, 2011 at 11:01 AM, Brooks Davis 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).