Infineon / linux-optiga-trust-m

Linux tools and examples for OPTIGA™ Trust V1/V3 security solution
MIT License
22 stars 18 forks source link

Fixes shmem existence check #20

Closed awidegreen closed 2 years ago

awidegreen commented 2 years ago

errno should not be checked on its own. Instead, the return value of the function that will set errno should be evaluated prior to evaluating errno.

see errno(3) The value in errno is significant only when the return value of the call indicated an error (i.e., -1 from most system calls; -1 or NULL from most library functions); a function that succeeds is allowed to change errno. The value of errno is never set to zero by any system call or library function.

By creating this pull request you agree to the terms in CONTRIBUTING.md. https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md --- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description Provide the information we need to review your PR. What problem does the pull request solve? "Bug fix" is not a good description.

Related Issue If you opened an issue before creating the PR, point to it here.

Context What do we need to know about your development environment, tools, target, and so on. Screenshots are always helpful if there is a UI element to this PR.