mesa: use standard offsetof() macro
authorBrian Paul <brianp@vmware.com>
Wed, 15 Apr 2009 01:44:16 +0000 (19:44 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 15 Apr 2009 01:44:16 +0000 (19:44 -0600)
src/mesa/main/extensions.c

index 147d923e64fad8a847a9663850d5ada7bbf6a95b..5c4bea9cf628cc7fc1509ae4c44cbf6cc8ff6ac6 100644 (file)
@@ -31,7 +31,7 @@
 #include "mtypes.h"
 
 
-#define F(x) (int)(uintptr_t)&(((struct gl_extensions *)0)->x)
+#define F(x) offsetof(struct gl_extensions, x)
 #define ON GL_TRUE
 #define OFF GL_FALSE