-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
treewide: add check for NRF_MODEM_LIB_ON_INIT return #20471
Conversation
526dba6
to
8df4940
Compare
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 7745d746fe26c8373d7b380ce613d70995a6c7e4 more detailssdk-nrf:
Github labels
List of changed files detected by CI (14)
Outputs:ToolchainVersion: 0f22b642ed Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
8df4940
to
83707ca
Compare
You can find the documentation preview for this PR at this link. Note: This comment is automatically posted by the Documentation Publish GitHub Action. |
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.
Could be convenient with error logging in the application-level callbacks
Do you mean logging the returned value inside the callback? |
Yeah, and just to indicate to the user that initialization failed and the app won't work as expected |
And probably only in apps, not in libraries? |
I would argue it makes sense in libraries too, some of them do it already. Any specific reason for not doing it in libraries in your opinion? |
Just that it could lead to duplicate logs if the app also reports the error. But that's not really a big problem, so I agree with you that library logging is also good |
83707ca
to
c78ecdc
Compare
I thought about that, but some applications (ex. customer) might not necessarily do it. I will add it then, thanks everyone. |
c78ecdc
to
b1eb03e
Compare
b1eb03e
to
b8724f1
Compare
acba6f0
to
695616c
Compare
samples/net/mqtt/src/modules/transport/credentials_provision/credentials_provision.c
Outdated
Show resolved
Hide resolved
Adds missing checks for the return value passed by `NRF_MODEM_LIB_ON_INIT`. Signed-off-by: Mirko Covizzi <[email protected]>
695616c
to
7745d74
Compare
Adds missing checks for the return value passed by
NRF_MODEM_LIB_ON_INIT
.