about summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-01-08 21:01:25 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-01-08 21:02:12 +0530
commiteeaa19f75e52d2d48074ae0c423f2311d67c42c6 (patch)
treeda7e46472c61a4b5866b5a08b544e10b3ef91a86 /misc
parent2f056e8a5dd4dc0f075413f931e82cede37d1057 (diff)
downloadglibc-eeaa19f75e52d2d48074ae0c423f2311d67c42c6.tar.gz
glibc-eeaa19f75e52d2d48074ae0c423f2311d67c42c6.tar.xz
glibc-eeaa19f75e52d2d48074ae0c423f2311d67c42c6.zip
mntent: Use __putc_unlocked instead of fputc_unlocked
__putc_unlocked is guaranteed to be inlined all the time as opposed to
fputc_unlocked, which does not get inlined when glibc is built with
-Os.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/mntent_r.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/mntent_r.c b/misc/mntent_r.c
index 30383a4a26..1005e143ab 100644
--- a/misc/mntent_r.c
+++ b/misc/mntent_r.c
@@ -223,16 +223,16 @@ write_string (FILE *stream, const char *str)
   while ((c = *str++) != '\0')
     {
       if (strchr (encode_chars, c) == NULL)
-	fputc_unlocked (c, stream);
+	__putc_unlocked (c, stream);
       else
 	{
-	  fputc_unlocked ('\\', stream);
-	  fputc_unlocked (((c & 0xc0) >> 6) + '0', stream);
-	  fputc_unlocked (((c & 0x38) >> 3) + '0', stream);
-	  fputc_unlocked (((c & 0x07) >> 0) + '0', stream);
+	  __putc_unlocked ('\\', stream);
+	  __putc_unlocked (((c & 0xc0) >> 6) + '0', stream);
+	  __putc_unlocked (((c & 0x38) >> 3) + '0', stream);
+	  __putc_unlocked (((c & 0x07) >> 0) + '0', stream);
 	}
     }
-  fputc_unlocked (' ', stream);
+  __putc_unlocked (' ', stream);
 }
 
 /* Write the mount table entry described by MNT to STREAM.