Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 2004 12:48:18 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        des@des.no
Cc:        current@freebsd.org
Subject:   Re: recent libalias changes
Message-ID:  <20040706114818.GA69128@walton.maths.tcd.ie>
In-Reply-To: <xzpvfh19y2u.fsf@dwp.des.no>
References:  <20040705133820.GA9159@stud.fit.vutbr.cz> <xzp1xjqbhee.fsf@dwp.des.no> <20040705161059.GA52584@walton.maths.tcd.ie> <xzpsmc6a02c.fsf@dwp.des.no> <xzpoemu9zfe.fsf@dwp.des.no> <20040706082906.GA50212@stud.fit.vutbr.cz> <xzpeknpbg0t.fsf@dwp.des.no> <20040706111403.GA68327@walton.maths.tcd.ie> <xzpvfh19y2u.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 06, 2004 at 01:25:45PM +0200, des@des.no wrote:
> the code I replaced has casts on the lvalue, which is not allowed.

The cast seems to be in the expression leading to the lvalue, but
not on the lvalue itself. That is,

	((char *)p)[0] = 1;	/* cast in expression */
	(char)p[1] = 1;		/* cast in lvalue */

I think the former is permitted, though it may not always be wise.

> >                     The while loop that is immediately above it
> > looks risky though, as this function is probably called with a
> > struct ip * somewhere.
> 
> yes, that's what I think may need rewriting.

Ah, grand...

	David.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040706114818.GA69128>