mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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>
This commit is contained in:
@@ -223,16 +223,16 @@ write_string (FILE *stream, const char *str)
|
|||||||
while ((c = *str++) != '\0')
|
while ((c = *str++) != '\0')
|
||||||
{
|
{
|
||||||
if (strchr (encode_chars, c) == NULL)
|
if (strchr (encode_chars, c) == NULL)
|
||||||
fputc_unlocked (c, stream);
|
__putc_unlocked (c, stream);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fputc_unlocked ('\\', stream);
|
__putc_unlocked ('\\', stream);
|
||||||
fputc_unlocked (((c & 0xc0) >> 6) + '0', stream);
|
__putc_unlocked (((c & 0xc0) >> 6) + '0', stream);
|
||||||
fputc_unlocked (((c & 0x38) >> 3) + '0', stream);
|
__putc_unlocked (((c & 0x38) >> 3) + '0', stream);
|
||||||
fputc_unlocked (((c & 0x07) >> 0) + '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.
|
/* Write the mount table entry described by MNT to STREAM.
|
||||||
|
Reference in New Issue
Block a user