Date: Mon, 1 Feb 1999 23:18:46 -0500 (EST) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: mjacob@feral.com Cc: cvs-commiters@FreeBSD.ORG Subject: sizeof (ptr) != sizeof (unsigned) Message-ID: <199902020418.XAA19148@khavrinen.lcs.mit.edu> In-Reply-To: <Pine.LNX.4.04.9902011910210.14678-100000@feral-gw> References: <Pine.LNX.4.04.9902011910210.14678-100000@feral-gw>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Mon, 1 Feb 1999 19:11:28 -0800 (PST), Matthew Jacob <mjacob@feral.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902020418.XAA19148>