Use fputs instead of printf in perror.c

This commit is contained in:
ceriel 1990-05-21 10:20:15 +00:00
parent da8f9124ff
commit 24c9be9777

View file

@ -10,7 +10,10 @@
void
perror(const char *s)
{
if (s && *s)
(void) fprintf(stderr,"%s: ", s);
(void) fprintf(stderr,"%s\n", strerror(errno));
if (s && *s) {
(void) fputs(s, stderr);
(void) fputs(": ", stderr);
}
(void) fputs(strerror(errno), stderr);
(void) fputs("\n", stderr);
}