From owner-cvs-all@FreeBSD.ORG Tue Dec 4 17:25:35 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 6445316A421; Tue, 4 Dec 2007 17:25:35 +0000 (UTC) Date: Tue, 4 Dec 2007 17:25:35 +0000 From: Alexey Dokuchaev To: John Baldwin Message-ID: <20071204172535.GB82261@FreeBSD.org> References: <200711232356.lANNu3mp040885@repoman.freebsd.org> <864pezer7f.fsf@ds4.des.no> <200712031657.34074.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200712031657.34074.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Dag-Erling Sm??rgrav , John Birrell , src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/netinet/libalias alias_util.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2007 17:25:35 -0000 On Mon, Dec 03, 2007 at 04:57:33PM -0500, John Baldwin wrote: > On Monday 03 December 2007 10:24:52 am Dag-Erling Sm??rgrav wrote: > > John Birrell writes: > > > Log: > > > Fix strict alias warnings. > > > > A much simpler solution (relative to the previous revision): > > > > @@ -131,10 +131,10 @@ > > sum += oddbyte; > > } > > /* "Pseudo-header" data */ > > - ptr = (u_short *) & (pip->ip_dst); > > + ptr = (void *)&pip->ip_dst; > > sum += *ptr++; > > sum += *ptr; > > - ptr = (u_short *) & (pip->ip_src); > > + ptr = (void *)&pip->ip_src; > > sum += *ptr++; > > sum += *ptr; > > sum += htons((u_short) ntcp); > > *ptr++ would choke since pointer arith on (void *) is undefined AFAIK. I've been under impression that ++ on void * whould simply increase it by one. ./danfe