From c7a6ab72e920bc442896a6e33fdcd7b318539859 Mon Sep 17 00:00:00 2001
From: Antoine Balestrat <merkil33@gmail.com>
Date: Fri, 13 Apr 2012 14:31:35 -0700
Subject: 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.
---
 sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'sysdeps/unix/sysv/linux/sparc')

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)
-- 
cgit v1.2.3-70-g09d2