Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 2014 00:35:09 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272880 - head/sys/ufs/ufs
Message-ID:  <201410100035.s9A0Z9dw011066@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Oct 10 00:35:08 2014
New Revision: 272880
URL: https://svnweb.freebsd.org/changeset/base/272880

Log:
  Restore the backed-out change, using __offsetof instead.

Modified:
  head/sys/ufs/ufs/dir.h

Modified: head/sys/ufs/ufs/dir.h
==============================================================================
--- head/sys/ufs/ufs/dir.h	Fri Oct 10 00:28:19 2014	(r272879)
+++ head/sys/ufs/ufs/dir.h	Fri Oct 10 00:35:08 2014	(r272880)
@@ -110,7 +110,7 @@ struct	direct {
  * 
  */
 #define	DIRECTSIZ(namlen)						\
-	(((uintptr_t)&((struct direct *)0)->d_name +			\
+	((__offsetof(struct direct, d_name) +				\
 	  ((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3)
 #if (BYTE_ORDER == LITTLE_ENDIAN)
 #define	DIRSIZ(oldfmt, dp) \



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