svn commit: r228564 - head/sys/sys

Ed Schouten ed at FreeBSD.org
Fri Dec 16 09:56:23 UTC 2011


Author: ed
Date: Fri Dec 16 09:56:22 2011
New Revision: 228564
URL: http://svn.freebsd.org/changeset/base/228564

Log:
  Fix typo in macro.
  
  I copied this macro directly from Bruce's email, as I assumed it was
  awesome already.
  
  Reported by:	tijl@

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==============================================================================
--- head/sys/sys/cdefs.h	Fri Dec 16 08:27:04 2011	(r228563)
+++ head/sys/sys/cdefs.h	Fri Dec 16 09:56:22 2011	(r228564)
@@ -361,7 +361,7 @@
 #else
 #ifndef __cplusplus
 #define	__offsetof(type, field) \
-	((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->member))
+	((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field))
 #else
 #define __offsetof(type, field)					\
   (__offsetof__ (reinterpret_cast <__size_t>			\


More information about the svn-src-head mailing list