Date: Tue, 18 Feb 2003 14:10:36 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Dag-Erling Smorgrav <des@ofug.org> Cc: "Jacques A. Vidrine" <nectar@FreeBSD.org>, Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.org Subject: Re: memset prototype changed? Message-ID: <3E52AF5C.CC292132@mindspring.com> References: <20030218105240.GH92966@rot13.obsecurity.org> <xzpheb1yhrq.fsf@flood.ping.uio.no> <20030218160442.GB81793@madman.celabo.org> <xzpznotwei1.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav wrote: > "Jacques A. Vidrine" <nectar@FreeBSD.org> writes: > > On Tue, Feb 18, 2003 at 12:01:29PM +0100, Dag-Erling Smorgrav wrote: > > > The code that fails to compile is blatantly wrong: > > > > > > memset(schedule, 0, sizeof(schedule)); > > I wouldn't say `blantantly'. The expressions `schedule' and > > `&schedule' are equivalent when `schedule' is an array type. > > ...but Key_schedule is an opaque type, so it is not correct to assume > it's an array. Aren't all "opaque types" pointers, by definition? Gotta wonder how one does a "sizeof()" on an "opaque type"... Seems to me that memset()'ing this thing to zero is a bogus thing to do in the first place, and that there should be an initialization routine, instead, that will do the job for you -- if not allocate you one of the things at the same time. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E52AF5C.CC292132>