container_of: avoid using __extension__
We can just write the macro on one line.
diff --git a/src/util.h b/src/util.h
index 07654ec..49a1cd9 100644
--- a/src/util.h
+++ b/src/util.h
@@ -57,11 +57,8 @@
#endif
#ifndef container_of
-#define container_of(ptr, type, member) \
- __extension__({ \
- void *__mptr = (void *)(ptr); \
- ((type *)(__mptr - offsetof(type, member))); \
- })
+#define container_of(ptr, type, member) \
+ ((type *) (((char *)(ptr)) - offsetof(type, member)))
#endif
#ifndef G_SIZEOF_MEMBER