diff --git a/src/core/instance/instance.cpp b/src/core/instance/instance.cpp index d00129c70d8..94b93028953 100644 --- a/src/core/instance/instance.cpp +++ b/src/core/instance/instance.cpp @@ -351,9 +351,7 @@ Instance &Instance::Get(uint8_t aIdx) uint8_t Instance::GetIdx(Instance *aInstance) { - return static_cast( - (reinterpret_cast(aInstance) - reinterpret_cast(gMultiInstanceRaw)) / - INSTANCE_SIZE_ALIGNED); + return static_cast((reinterpret_cast(aInstance) - gMultiInstanceRaw) / INSTANCE_SIZE_ALIGNED); } #endif // #if OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE