Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Aug 2010 09:50:07 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        des@des.no
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, olli@fromme.com, jilles@stack.nl
Subject:   Re: svn commit: r211023 - head/usr.sbin/syslogd
Message-ID:  <20100809.095007.4959786895405928.imp@bsdimp.com>
In-Reply-To: <86tyn4tbuc.fsf@ds4.des.no>
References:  <20100808.153608.1142818667055052395.imp@bsdimp.com> <20100808220631.GA86477@stack.nl> <86tyn4tbuc.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <86tyn4tbuc.fsf@ds4.des.no>
            Dag-Erling Sm=F8rgrav <des@des.no> writes:
: 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))

I like the idea of a macro.  Why is a cast through uintptr_t better?

Warner



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