From owner-freebsd-current@FreeBSD.ORG Tue Jul 6 11:48:20 2004 Return-Path: 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 7075C16A4CE for ; Tue, 6 Jul 2004 11:48:20 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id A73D543D45 for ; Tue, 6 Jul 2004 11:48:19 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 6 Jul 2004 12:48:18 +0100 (BST) Date: Tue, 6 Jul 2004 12:48:18 +0100 From: David Malone To: des@des.no Message-ID: <20040706114818.GA69128@walton.maths.tcd.ie> References: <20040705133820.GA9159@stud.fit.vutbr.cz> <20040705161059.GA52584@walton.maths.tcd.ie> <20040706082906.GA50212@stud.fit.vutbr.cz> <20040706111403.GA68327@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i Sender: dwmalone@maths.tcd.ie cc: Divacky Roman cc: current@freebsd.org Subject: Re: recent libalias changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 11:48:20 -0000 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.