Date: Fri, 7 Sep 2001 17:46:26 -0500 From: Chris Costello <chris@calldei.com> To: Leo Bicknell <bicknell@ufp.org> Cc: FreeBSD Hackers <hackers@FreeBSD.ORG> Subject: Re: tiny patch to pkg_add Message-ID: <20010907174626.A548@holly.calldei.com> In-Reply-To: <20010907183242.A66179@ussenterprise.ufp.org>; from bicknell@ufp.org on Fri, Sep 07, 2001 at 06:32:42PM -0400 References: <20010907150416.A38565@dub.net> <20010907151935.A40146@dub.net> <20010907183242.A66179@ussenterprise.ufp.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, September 07, 2001, Leo Bicknell wrote: > I think Chris's version is right, although if you're writing a > security app, or just want to be overly paranoid in general > you could use: > > bzero((void *)packagesite, sizeof(packagesite)); That's unnecessary unless you know you're going to be reading data from that string starting somewhere other than &packagesite[0];. And the `void *' cast is unnecessary, as an array is converted to a pointer when passed to a function, and any data pointer is also implicitly converted to a `void *' pointer where necessary. -- +-------------------+------------------------+ | Chris Costello | Save energy: | | chris@calldei.com | Drive a smaller shell. | +-------------------+------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010907174626.A548>