* Get a message string describing the given error number. * * @param errnum The error number to be interpreted * @return A pointer to a string describing the given error number */
| 568 | * @return A pointer to a string describing the given error number |
| 569 | */ |
| 570 | char *strerror(int errnum) |
| 571 | { |
| 572 | /* Reserve enough space for the string below + INT64_MIN in decimal + \0 */ |
| 573 | static char errstr[35]; |
| 574 | snprintf(errstr, sizeof(errstr), "Unknown error %d", errnum); |
| 575 | return errstr; |
| 576 | } |
| 577 | |
| 578 | /* |
| 579 | * Simple routine to convert UTF-16 to ASCII, giving up with ? if too high. |
no test coverage detected