Please sign in to comment.
Don't append strerror() to error message when errno is 0.
Some functions (e.g. getpwnam()/getgrnam()) will return an error but not set errno. In this case there's no use in appending strerror(), which will be "Success". This is confusing since an error has just been reported. At least in the examples above, an error with no errno set just means "missing" and our current error message already conveys that.
- Loading branch information...
Showing with 43 additions and 4 deletions.