-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(aws_iot): fix logical and/or error in snprintk checks #25361
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
Conversation
|
Thank you for your contribution! Note: This comment is automatically posted and updated by the Contribs GitHub Action. |
|
Hey! |
|
Please use |
f0c199c to
541b7c2
Compare
|
The commit message has been updated |
|
Compliance fails due to the commit message body not following the contribution guidelines. The compliance check also mentions your signed-off line, but to me it looks right. Please verify that it is in accordance with the guidelines below: Edit: Make sure the name and email address you use in the signed-off-by matches the name and email in the Git commit’s author field. |
Check AWS MQTT topic construction with OR, as conditions are exclusive. Signed-off-by: William Panton <william@pantondesign.com>
|
Hopefully these errors have now been fixed. |
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 22ea079d7c8955ac4f2443bf36b7138167ec7f0e more detailssdk-nrf:
Github labels
List of changed files detected by CI (1)Outputs:ToolchainVersion: cfa6b06338 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
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.
Thanks for the fix!
This PR fixes a bug identified in aws_iot.
Since err cannot be both negative AND greater-than-or-equal to a positive value simultaneously, none of the 10 error checks in aws_topics_construct() function were working.
Root Cause:
snprintk()returns:Both conditions indicate errors and should be checked with OR logic, not AND.
This is a pure bug fix that makes existing error handling work as intended. No functional changes to success paths.