From owner-freebsd-current Sat Mar 6 10:16:52 1999 Delivered-To: freebsd-current@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id 498A115286 for ; Sat, 6 Mar 1999 10:16:47 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id NAA17855; Sat, 6 Mar 1999 13:16:25 -0500 (EST) Date: Sat, 6 Mar 1999 13:16:25 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Nate Williams Cc: John Polstra , current@FreeBSD.ORG Subject: Re: callout changes nit In-Reply-To: <199903061736.KAA24445@mt.sri.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 6 Mar 1999, Nate Williams wrote: > > > I make a habit of checking out any interesting kernel changes in full, and one > > > thing I found in the recent diff by Mr. Wollman for kern_timeout.c is: > > > > > > +void > > > +callout_init(c) > > > + struct callout *c; > > > +{ > > > + bzero(c, sizeof c); > > > } > > > > > > That doesn't look correct, does it? > > > > Agreed. I think it should be "sizeof *c". > > Ahh, I see. I think it should say > > bzero(c, sizeof(struct callout)); > > To avoid the compiler using the size of the pointers et. al. > I prefer to do this in my own code, usually. However, using *c doesn't "use the size of the pointer". > > Nate > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message