From owner-cvs-all Mon Feb 1 20:19:01 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA05297 for cvs-all-outgoing; Mon, 1 Feb 1999 20:19:01 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA05107 for ; Mon, 1 Feb 1999 20:18:55 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.1/8.9.1) id XAA19148; Mon, 1 Feb 1999 23:18:46 -0500 (EST) (envelope-from wollman) Date: Mon, 1 Feb 1999 23:18:46 -0500 (EST) From: Garrett Wollman Message-Id: <199902020418.XAA19148@khavrinen.lcs.mit.edu> To: mjacob@feral.com Cc: cvs-commiters@FreeBSD.ORG Subject: sizeof (ptr) != sizeof (unsigned) In-Reply-To: References: Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk < said: > bcopy(&p1->p_procsig->ps_begincopy, &p2->p_procsig->ps_begincopy, > (unsigned)&p1->p_procsig->ps_endcopy - > (unsigned)&p1->p_procsig->ps_begincopy); > What's this for? This copies just the part of the proc struct that's supposed to be copied. It would be cleaner if the operands were cast to `char *', but it should work either way on any processor architecture the kernel is ever likely to run on. (Of course, the type of the third formal argument to bcopy() must have at least the range of a positive ptrdiff_t, but there are plenty of other places where this is already required.) -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message