]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes compiler warning in OFFSETOF().
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 23 Jul 2009 20:21:17 +0000 (22:21 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 23 Jul 2009 20:21:17 +0000 (22:21 +0200)
lib/birdlib.h

index b7cd6b43125ab50e66c517ac41b6e5c5d9d9d393..12a581b7e4d528fb16708b7fba4a311971994c6f 100644 (file)
@@ -13,7 +13,7 @@
 
 /* Ugly structure offset handling macros */
 
-#define OFFSETOF(s, i) ((unsigned int)&((s *)0)->i)
+#define OFFSETOF(s, i) ((size_t) &((s *)0)->i)
 #define SKIP_BACK(s, i, p) ((s *)((char *)p - OFFSETOF(s, i)))
 #define BIRD_ALIGN(s, a) (((s)+a-1)&~(a-1))