perror should use strerror

This commit is contained in:
K. Lange 2018-07-19 22:52:27 +09:00
parent 79bada381a
commit ba10025308

View File

@ -2,5 +2,5 @@
#include <errno.h>
void perror(const char *s) {
fprintf(stderr, "%s: error %d\n", s, errno);
fprintf(stderr, "%s: %s\n", s, strerror(errno));
}