Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libkern make offsetof lint friendlier.



details:   https://anonhg.NetBSD.org/src/rev/860c27f554de
branches:  trunk
changeset: 538660:860c27f554de
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 24 20:53:50 2002 +0000

description:
make offsetof lint friendlier.

diffstat:

 sys/lib/libkern/libkern.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r bc09e71ae769 -r 860c27f554de sys/lib/libkern/libkern.h
--- a/sys/lib/libkern/libkern.h Thu Oct 24 20:52:38 2002 +0000
+++ b/sys/lib/libkern/libkern.h Thu Oct 24 20:53:50 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: libkern.h,v 1.46 2002/10/06 08:51:44 tls Exp $ */
+/*     $NetBSD: libkern.h,v 1.47 2002/10/24 20:53:50 christos Exp $    */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -219,7 +219,8 @@
 #endif
 
 #ifndef offsetof
-#define        offsetof(type, member)  ((size_t)(&((type *)0)->member))
+#define        offsetof(type, member) \
+    ((size_t)(unsigned long)(&(((type *)0)->member)))
 #endif
 
 /* Prototypes for non-quad routines. */



Home | Main Index | Thread Index | Old Index