[COMMITTED] misc: Use __ferror_unlocked instead of ferror

Message ID 20201223020107.1232629-1-siddhesh@sourceware.org
State Committed
Headers
Series [COMMITTED] misc: Use __ferror_unlocked instead of ferror |

Commit Message

Siddhesh Poyarekar Dec. 23, 2020, 2:01 a.m. UTC
  The ferror results in an unnecessary PLT reference.  Use
__ferror_unlocked instead , which gets inlined.
---
 misc/mntent_r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/misc/mntent_r.c b/misc/mntent_r.c
index 39fa08f2c6..b963c9af61 100644
--- a/misc/mntent_r.c
+++ b/misc/mntent_r.c
@@ -253,7 +253,7 @@  __addmntent (FILE *stream, const struct mntent *mnt)
   write_string (stream, mnt->mnt_opts);
   fprintf (stream, "%d %d\n", mnt->mnt_freq, mnt->mnt_passno);
 
-  ret = ferror (stream) != 0 || fflush (stream) != 0;
+  ret = __ferror_unlocked (stream) != 0 || fflush (stream) != 0;
 
   funlockfile (stream);