This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3/4] alpha: Avoid fgets plt entry


And since the FILE is function local, avoid locking too.
---
 ChangeLog.alpha                        |    3 +++
 sysdeps/unix/sysv/linux/alpha/ioperm.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index e327242..246345a 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,5 +1,8 @@
 2012-05-30  Richard Henderson  <rth@twiddle.net>
 
+	* sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo): Use
+	fgets_unlocked.
+
 	* sysdeps/alpha/Implies: Include ieee754/dbl-64/wordsize-64.
 
 	* sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Use dynamic rounding.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 8b6c830..686c7ed 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -504,7 +504,7 @@ process_cpuinfo(struct cpuinfo_data *data)
 
   while (1)
     {
-      if (fgets (dummy, 256, fp) == NULL)
+      if (fgets_unlocked (dummy, 256, fp) == NULL)
 	break;
       if (!got_type &&
 	  sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1)
-- 
1.7.7.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]