about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sparc
diff options
context:
space:
mode:
authorAntoine Balestrat <merkil33@gmail.com>2012-04-13 14:31:35 -0700
committerDavid S. Miller <davem@davemloft.net>2012-04-13 14:31:35 -0700
commitc7a6ab72e920bc442896a6e33fdcd7b318539859 (patch)
treebeb5baaef5492f21c1f65e97ac0faadda42e6086 /sysdeps/unix/sysv/linux/sparc
parenta9e8e0e0f3b8793b618f5b3c718723a7c12ba4b2 (diff)
downloadglibc-c7a6ab72e920bc442896a6e33fdcd7b318539859.tar.gz
glibc-c7a6ab72e920bc442896a6e33fdcd7b318539859.tar.xz
glibc-c7a6ab72e920bc442896a6e33fdcd7b318539859.zip
Fix variable check in sparc clock frequency probing.
	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
	(__get_clockfreq_via_proc_openprom): Fix test on wrong variable.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
index e3cea9fb50..cbb817952e 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)