kernel: object: add missing parentheses to OBJECT_CAST

This commit is contained in:
2026-04-19 20:00:16 +01:00
parent a2f370f326
commit b52890d842
+1 -1
View File
@@ -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