From owner-freebsd-current Tue Feb 18 14:12: 2 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB6C037B401; Tue, 18 Feb 2003 14:12:00 -0800 (PST) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4321343F93; Tue, 18 Feb 2003 14:12:00 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0311.cvx40-bradley.dialup.earthlink.net ([216.244.43.56] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18lFy0-0002Ps-00; Tue, 18 Feb 2003 14:11:57 -0800 Message-ID: <3E52AF5C.CC292132@mindspring.com> Date: Tue, 18 Feb 2003 14:10:36 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Dag-Erling Smorgrav Cc: "Jacques A. Vidrine" , Kris Kennaway , current@FreeBSD.org Subject: Re: memset prototype changed? References: <20030218105240.GH92966@rot13.obsecurity.org> <20030218160442.GB81793@madman.celabo.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4c19ab5792c1f284700ba1394be28f0a9350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dag-Erling Smorgrav wrote: > "Jacques A. Vidrine" 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