From owner-cvs-src@FreeBSD.ORG Tue Dec 4 18:28:41 2007 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C54416A477; Tue, 4 Dec 2007 18:28:41 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.freebsd.org (Postfix) with ESMTP id C7B3713C469; Tue, 4 Dec 2007 18:28:40 +0000 (UTC) (envelope-from max@love2party.net) Received: from amd64.laiers.local (dslb-088-066-002-003.pools.arcor-ip.net [88.66.2.3]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1IzcVa08zk-00042O; Tue, 04 Dec 2007 19:28:38 +0100 From: Max Laier Organization: FreeBSD To: Alexey Dokuchaev Date: Tue, 4 Dec 2007 19:28:27 +0100 User-Agent: KMail/1.9.7 References: <200711232356.lANNu3mp040885@repoman.freebsd.org> <200712031657.34074.jhb@freebsd.org> <20071204172535.GB82261@FreeBSD.org> In-Reply-To: <20071204172535.GB82261@FreeBSD.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart22582662.YxohYx2DNr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200712041928.36391.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18B3+f8BUQR81uM738b9eVB24c1HPfIFFaq/dw r1/XpMkBs5PFIXrNw1i+qAdhN/ZxqAI98k2sBk1hCGtnp2nA/G +qtwwhEp2jq4ZT19rnqNnevEQAVk6M0OhUPK9Olya8= Cc: src-committers@freebsd.org, John Baldwin , cvs-src@freebsd.org, cvs-all@freebsd.org, John Birrell , Dag-Erling Sm??rgrav Subject: Re: cvs commit: src/sys/netinet/libalias alias_util.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2007 18:28:41 -0000 --nextPart22582662.YxohYx2DNr Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 04 December 2007, Alexey Dokuchaev wrote: > 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 +=3D oddbyte; > > > } > > > /* "Pseudo-header" data */ > > > - ptr =3D (u_short *) & (pip->ip_dst); > > > + ptr =3D (void *)&pip->ip_dst; > > > sum +=3D *ptr++; > > > sum +=3D *ptr; > > > - ptr =3D (u_short *) & (pip->ip_src); > > > + ptr =3D (void *)&pip->ip_src; > > > sum +=3D *ptr++; > > > sum +=3D *ptr; > > > sum +=3D 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. wasn't that the reason why caddr_t exists? i.e. pointer arithmetic on=20 void * is bad, but on caddr_t it's kinda okay. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart22582662.YxohYx2DNr Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHVZxUXyyEoT62BG0RAiFkAJ0aJeMtD6RgVGZ73TL2+2RuE5dhowCfbbTt Bga2trPY+XsJ1kewgQer84s= =hKUi -----END PGP SIGNATURE----- --nextPart22582662.YxohYx2DNr--