From owner-svn-src-head@FreeBSD.ORG Mon Aug 9 15:54:07 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 532E41065672; Mon, 9 Aug 2010 15:54:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id EBAB08FC15; Mon, 9 Aug 2010 15:54:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o79FnbRY057939; Mon, 9 Aug 2010 09:49:37 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 09 Aug 2010 09:50:07 -0600 (MDT) Message-Id: <20100809.095007.4959786895405928.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86tyn4tbuc.fsf@ds4.des.no> References: <20100808.153608.1142818667055052395.imp@bsdimp.com> <20100808220631.GA86477@stack.nl> <86tyn4tbuc.fsf@ds4.des.no> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2010 15:54:07 -0000 In message: <86tyn4tbuc.fsf@ds4.des.no> Dag-Erling Sm=F8rgrav writes: : Jilles Tjoelker 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