minor optimization in puts: use inline putc_unlocked macro for newline
authorRich Felker <dalias@aerifal.cx>
Mon, 2 May 2011 00:12:51 +0000 (20:12 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 2 May 2011 00:12:51 +0000 (20:12 -0400)
src/stdio/puts.c

index 4c0e583cfae7cd32e4d896fa9edb12cf14838629..5a38a49b975adcad3192eda3148ef1acf55ad0df 100644 (file)
@@ -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;
 }