Date: Tue, 4 Dec 2007 19:28:27 +0100 From: Max Laier <max@love2party.net> To: Alexey Dokuchaev <danfe@freebsd.org> Cc: src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>, cvs-src@freebsd.org, cvs-all@freebsd.org, John Birrell <jb@freebsd.org>, Dag-Erling Sm??rgrav <des@des.no> Subject: Re: cvs commit: src/sys/netinet/libalias alias_util.c Message-ID: <200712041928.36391.max@love2party.net> In-Reply-To: <20071204172535.GB82261@FreeBSD.org> References: <200711232356.lANNu3mp040885@repoman.freebsd.org> <200712031657.34074.jhb@freebsd.org> <20071204172535.GB82261@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <jb@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712041928.36391.max>