summaryrefslogtreecommitdiffstats
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/config.h b/src/config.h
index cee8511..34ae11d 100644
--- a/src/config.h
+++ b/src/config.h
@@ -147,17 +147,6 @@
*/
#define BFS_COUNTOF(array) (sizeof(array) / sizeof(0[array]))
-// BFS_CONTAINER_OF() helper
-static inline char *bfs_container_offset(char *ptr, ptrdiff_t offset, size_t unused) {
- return ptr ? ptr - offset : NULL;
-}
-
-/**
- * Move a pointer from a field to its outer struct.
- */
-#define BFS_CONTAINER_OF(ptr, type, member) \
- ((type *)bfs_container_offset((char *)(ptr), offsetof(type, member), sizeof((ptr) - &((type *)NULL)->member)))
-
// Lower bound on BFS_FLEX_SIZEOF()
#define BFS_FLEX_LB(type, member, length) (offsetof(type, member) + sizeof(((type *)NULL)->member[0]) * (length))