diff --git a/include/kernel/object.h b/include/kernel/object.h index 74b2bd0..3444f3d 100644 --- a/include/kernel/object.h +++ b/include/kernel/object.h @@ -65,7 +65,7 @@ extern "C" { #define OBJECT_PATH_MAX 256 #define OBJECT_CAST(to_type, to_type_member, p) \ - ((to_type *)((uintptr_t)p) - offsetof(to_type, to_type_member)) + ((to_type *)(((uintptr_t)p) - offsetof(to_type, to_type_member))) #define OBJECT_C_CAST(c_type, c_type_member, obj_type, objp) \ OBJECT_IS_TYPE(objp, obj_type) \ ? OBJECT_CAST(c_type, c_type_member, (objp)) : NULL