perror() should send output to stderr.

This commit is contained in:
Andreas Kling 2018-10-31 21:37:09 +01:00
parent 8f6998c902
commit 4605b549d6
Notes: sideshowbarker 2024-07-19 18:35:36 +09:00

View file

@ -170,7 +170,7 @@ int sprintf(char* buffer, const char* fmt, ...)
void perror(const char* s)
{
printf("%s: %s\n", s, strerror(errno));
fprintf(stderr, "%s: %s\n", s, strerror(errno));
}
FILE* fopen(const char* pathname, const char* mode)