소스 검색

minor optimization in puts: use inline putc_unlocked macro for newline

Rich Felker 14 년 전
부모
커밋
d02c50d6a3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/stdio/puts.c

+ 1 - 1
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;
 }