...
TR 24731-1 introduces the new type errno_t that is defined to be type int in errno.h and elsewhere. Many of the functions defined in TR 24731-1 return values of this type [TR 24731-1]. The errno_t type should be used as the type of an object that may only contain values that might be found in errno. For example, a function that returns the value of errno should be declared as having the return type errno_t.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
| CERT C++ Secure Coding Standard | DCL09-CPP. Declare functions that return errno with a return type of errno_t |
|---|---|
| ISO/IEC TR 24731-1:2007 | |
| ISO/IEC TR 24772 | "NZN Returning error status" |
| MISRA-C | Rule 20.5 |
...