From 24c9be9777e684eed6a6fc09a2a460bb4a60b619 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 21 May 1990 10:20:15 +0000 Subject: [PATCH] Use fputs instead of printf in perror.c --- lang/cem/libcc.ansi/stdio/perror.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lang/cem/libcc.ansi/stdio/perror.c b/lang/cem/libcc.ansi/stdio/perror.c index 70055e6fb..962d4bc93 100644 --- a/lang/cem/libcc.ansi/stdio/perror.c +++ b/lang/cem/libcc.ansi/stdio/perror.c @@ -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); } -- 2.34.1