nanocoap_link_format: fix off-by-one error#19307
Merged
bors[bot] merged 1 commit intoRIOT-OS:masterfrom Feb 23, 2023
Merged
Conversation
miri64
approved these changes
Feb 23, 2023
Member
|
bors merge |
Contributor
|
🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Contributor
Author
|
bors merge |
Contributor
|
Already running a review |
bors bot
added a commit
that referenced
this pull request
Feb 23, 2023
19292: sys/phydat: Fix unit confusion r=benpicco a=maribu ### Contribution description Previously, `UNIT_G` was used for g-force with the correct symbol `g`, `UNIT_GR` for gram (as in kilogram) with the incorrect symbol `G` (which would be correct for Gauss), and `UNIT_GS` for Gauss with symbol `Gs` (which is an alternative correct symbol). To avoid confusion between G-Force, Gauss, and Gram the units have been renamed to `UNIT_G_FORCE`, `UNIT_GRAM`, and `UNIT_GAUSS`. In addition, gram now uses the correct symbol `g`; which sadly is the same as for g-force. But usually there is enough context to tell them apart. ### Testing procedure Green CI ### Issues/PRs references None 19307: nanocoap_link_format: fix off-by-one error r=miri64 a=benpicco Co-authored-by: Marian Buschsieweke <[email protected]> Co-authored-by: Benjamin Valentin <[email protected]>
Contributor
|
This PR was included in a batch that was canceled, it will be automatically retried |
Member
|
bors merge |
Contributor
|
Already running a review |
bors bot
added a commit
that referenced
this pull request
Feb 23, 2023
19292: sys/phydat: Fix unit confusion r=miri64 a=maribu ### Contribution description Previously, `UNIT_G` was used for g-force with the correct symbol `g`, `UNIT_GR` for gram (as in kilogram) with the incorrect symbol `G` (which would be correct for Gauss), and `UNIT_GS` for Gauss with symbol `Gs` (which is an alternative correct symbol). To avoid confusion between G-Force, Gauss, and Gram the units have been renamed to `UNIT_G_FORCE`, `UNIT_GRAM`, and `UNIT_GAUSS`. In addition, gram now uses the correct symbol `g`; which sadly is the same as for g-force. But usually there is enough context to tell them apart. ### Testing procedure Green CI ### Issues/PRs references None 19307: nanocoap_link_format: fix off-by-one error r=miri64 a=benpicco Co-authored-by: Marian Buschsieweke <[email protected]> Co-authored-by: Benjamin Valentin <[email protected]>
Contributor
|
This PR was included in a batch that was canceled, it will be automatically retried |
Member
|
bors cancel |
Contributor
|
Canceled. |
Member
|
bors merge |
Member
|
bors cancel |
Contributor
|
Canceled. |
bors bot
added a commit
that referenced
this pull request
Feb 23, 2023
19292: sys/phydat: Fix unit confusion r=miri64 a=maribu ### Contribution description Previously, `UNIT_G` was used for g-force with the correct symbol `g`, `UNIT_GR` for gram (as in kilogram) with the incorrect symbol `G` (which would be correct for Gauss), and `UNIT_GS` for Gauss with symbol `Gs` (which is an alternative correct symbol). To avoid confusion between G-Force, Gauss, and Gram the units have been renamed to `UNIT_G_FORCE`, `UNIT_GRAM`, and `UNIT_GAUSS`. In addition, gram now uses the correct symbol `g`; which sadly is the same as for g-force. But usually there is enough context to tell them apart. ### Testing procedure Green CI ### Issues/PRs references None 19307: nanocoap_link_format: fix off-by-one error r=miri64 a=benpicco Co-authored-by: Marian Buschsieweke <[email protected]> Co-authored-by: Benjamin Valentin <[email protected]>
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
We set the byte at the
endpostition to 0, butbuffer[sizeof(buffer)]is actually outside ofbuffer, we have to usesizeof(buffer) - 1.Testing procedure
Thanks to @Teufelchen1 for spotting this!
Resource listing still works
Issues/PRs references