From 2db3ddca33143e2b0478d5ea9e1a5a65997cb33b Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 28 Jun 2021 09:45:01 -0700 Subject: [PATCH] [simulation] remove use of internal definitions/headers in radio platform (#6766) This commit updates the `simulation/radio.c` and removes the uses of core internal macro `VerifyOfExit()` and replaces them with `otEXPECT_ACTION()`. This ensures that radio platform layer does not include the internal OT header like "common/code_utils.hpp". --- examples/platforms/simulation/radio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/platforms/simulation/radio.c b/examples/platforms/simulation/radio.c index 62712b4fb..7874ad5a5 100644 --- a/examples/platforms/simulation/radio.c +++ b/examples/platforms/simulation/radio.c @@ -39,7 +39,6 @@ #include #include -#include "common/code_utils.hpp" #include "utils/code_utils.h" #include "utils/link_metrics.h" #include "utils/mac_frame.h" @@ -1230,7 +1229,7 @@ otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aCh otError error = OT_ERROR_NONE; - VerifyOrExit(aChannel >= kMinChannel && aChannel <= kMaxChannel, error = OT_ERROR_INVALID_ARGS); + otEXPECT_ACTION(aChannel >= kMinChannel && aChannel <= kMaxChannel, error = OT_ERROR_INVALID_ARGS); sChannelMaxTransmitPower[aChannel - kMinChannel] = aMaxPower; exit: @@ -1262,7 +1261,7 @@ otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode) OT_UNUSED_VARIABLE(aInstance); otError error = OT_ERROR_NONE; - VerifyOrExit(aRegionCode != NULL, error = OT_ERROR_INVALID_ARGS); + otEXPECT_ACTION(aRegionCode != NULL, error = OT_ERROR_INVALID_ARGS); *aRegionCode = sRegionCode; exit: