Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Aug 2010 10:43:55 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, olli@fromme.com, "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: svn commit: r211023 - head/usr.sbin/syslogd
Message-ID:  <86tyn4tbuc.fsf@ds4.des.no>
In-Reply-To: <20100808220631.GA86477@stack.nl> (Jilles Tjoelker's message of "Mon, 9 Aug 2010 00:06:31 %2B0200")
References:  <20100807.205058.260300877050427878.imp@bsdimp.com> <201008082037.o78KbLDt022321@haluter.fromme.com> <20100808.153608.1142818667055052395.imp@bsdimp.com> <20100808220631.GA86477@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Jilles Tjoelker <jilles@stack.nl> writes:
> In other cases, I propose adding a cast to void * in between, like
>   (struct sockaddr_in *)(void *)ai->ai_addr

Better to cast through uintptr_t.  Perhaps we should have a
__DECONST-like macro for this?

#define __ALIGNED_CAST(t, v) ((t)(uintptr_t)(v))

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



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