]> granicus.if.org Git - strace/commitdiff
Trivial speed optimization
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 16 Apr 2012 16:10:15 +0000 (18:10 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 16 Apr 2012 16:10:15 +0000 (18:10 +0200)
* strace.c (tprints): Use fputs_unlocked instead of fputs.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
strace.c

index 1097b0c1d148dc30ed4adb869a822e3cffff2725..34690fc3c7659c5f143183bfeac72fc4ff4ee99b 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -527,7 +527,7 @@ void
 tprints(const char *str)
 {
        if (current_tcp) {
-               int n = fputs(str, current_tcp->outf);
+               int n = fputs_unlocked(str, current_tcp->outf);
                if (n >= 0) {
                        current_tcp->curcol += strlen(str);
                        return;