-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove exit: return
idiom from src/ble
#7518
Conversation
#### Problem The `Exit` group of error-handling macros inhibit scoping, and are unnecessary when there is no cleanup at the `exit:` label. #### Change overview - Remove `exit: return` idiom from `src/ble`, replacing `Exit` macros with corresponding `Return` macros. #### Testing No change to functionality; existing tests should catch regressions.
timerErr = mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleConnectTimeout, this); | ||
VerifyOrExit(timerErr == CHIP_SYSTEM_NO_ERROR, err = BLE_ERROR_START_TIMER_FAILED); | ||
const chip::System::Error timerErr = mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleConnectTimeout, this); | ||
VerifyOrReturnError(timerErr == CHIP_SYSTEM_NO_ERROR, BLE_ERROR_START_TIMER_FAILED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file would benefit from error-code unification.
Re-starting tests, but they looked like real failures/timeouts |
Size increase report for "esp32-example-build" from 63e9462
Full report output
|
Size increase report for "gn_qpg6100-example-build" from 63e9462
Full report output
|
Size increase report for "nrfconnect-example-build" from 63e9462
Full report output
|
#### Problem The `Exit` group of error-handling macros inhibit scoping, and are unnecessary when there is no cleanup at the `exit:` label. #### Change overview - Remove `exit: return` idiom from `src/ble`, replacing `Exit` macros with corresponding `Return` macros. #### Testing No change to functionality; existing tests should catch regressions.
Problem
The
Exit
group of error-handling macros inhibit scoping, andare unnecessary when there is no cleanup at the
exit:
label.Change overview
exit: return
idiom fromsrc/ble
, replacingExit
macroswith corresponding
Return
macros.Testing
No change to functionality; existing tests should catch regressions.