Commit a43bdcd7 authored by Johann Koenig's avatar Johann Koenig Committed by Gerrit Code Review
Browse files

Merge "halloc: Cast the offsetof macro to ptrdiff_t before negating"

parents e34e5419 bf8c6207
Branches
Tags
No related merge requests found
Showing with 1 addition and 1 deletion
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/* /*
restore pointer to the structure by a pointer to its field restore pointer to the structure by a pointer to its field
*/ */
#define structof(p,t,f) ((t*)(- offsetof(t,f) + (char*)(p))) #define structof(p,t,f) ((t*)(- (ptrdiff_t) offsetof(t,f) + (char*)(p)))
/* /*
* redefine for the target compiler * redefine for the target compiler
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment