From d02c50d6a34ff28db2486fbeac86e513286d52e9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 1 May 2011 20:12:51 -0400 Subject: [PATCH] minor optimization in puts: use inline putc_unlocked macro for newline --- src/stdio/puts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdio/puts.c b/src/stdio/puts.c index 4c0e583c..5a38a49b 100644 --- a/src/stdio/puts.c +++ b/src/stdio/puts.c @@ -4,7 +4,7 @@ int puts(const char *s) { int r; FLOCK(stdout); - r = -(fputs(s, stdout) < 0 || putchar('\n') < 0); + r = -(fputs(s, stdout) < 0 || putc_unlocked('\n', stdout) < 0); FUNLOCK(stdout); return r; } -- 2.25.1