This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Trivial typo fix in sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
- From: Antoine Balestrat <merkil33 at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 6 Apr 2012 20:32:25 +0200
- Subject: [PATCH] Trivial typo fix in sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
Hello !
I've noticed a probable copy/paste error in
sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c. We are checking
two times for the same file descriptor's opening while leaving another
unchecked. The following patch aims to fix that.
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
index e181d9d..eeebed6 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
@@ -126,7 +126,7 @@ __get_clockfreq_via_proc_openprom (void)
? ?? ? ?__stpcpy (prop, "/clock-frequency");
? ?? ? ?clkfreq_fd = open (node, O_RDONLY);
- ?? ? ?if (fd != -1)
+ ?? ? ?if (clkfreq_fd != -1)
? {
? ??if (read (clkfreq_fd, type_string,
? ?? ?sizeof (type_string)) > 0)