This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] 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)


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