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

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

parents e34e5419 bf8c6207
......@@ -20,7 +20,7 @@
/*
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
......
Markdown is supported
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