Avoid accessing errno on unexpected return values.#810
Merged
josephlr merged 1 commit intorust-random:masterfrom Feb 18, 2026
Merged
Avoid accessing errno on unexpected return values.#810josephlr merged 1 commit intorust-random:masterfrom
errno on unexpected return values.#810josephlr merged 1 commit intorust-random:masterfrom
Conversation
Contributor
Author
|
I could not find the documentation for VxWorks |
b8e5f09 to
64b5873
Compare
newpavlov
reviewed
Feb 17, 2026
Member
newpavlov
left a comment
There was a problem hiding this comment.
Did you intentionally remove the check for getentropy?
0cc05bb to
0fef0d8
Compare
Contributor
Author
Nope. Thanks for catching that. I was originally planning to do the references to POSIX in a separate PR but decided to merge them at the last minute, but then messed up the merge. Fixed. |
0fef0d8 to
8f2ae7b
Compare
newpavlov
approved these changes
Feb 18, 2026
Member
newpavlov
left a comment
There was a problem hiding this comment.
It's worth to rebase and add a changelog entry for this PR as well.
josephlr
approved these changes
Feb 18, 2026
Member
josephlr
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks for the fix!
We expect that these system calls will never return anything other than 0 or -1 but if they do for some reason, then we shouldn't access `errno`.
8f2ae7b to
70b09d7
Compare
Contributor
Author
|
Rebased with updated changelog. |
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.
We expect that these system calls will never return anything other than 0 or -1 but if they do for some reason, then we shouldn't access
errno.