summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Root <jmr@macports.org>2012-11-09 14:39:14 +1100
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-12-10 06:46:36 -0500
commit2092aa0d92f3aa6e3c30d46771bfbbc92c062cc4 (patch)
tree4ee97ac8cbe6b53432491d88a0df56ff072ffeb7
parent9029026edd46dbfcc651f596d763533496554936 (diff)
downloadpixman-2092aa0d92f3aa6e3c30d46771bfbbc92c062cc4.tar.gz
Fix undeclared variable use and sysctlbyname error handling on ppc
Fixes bug 56889.
-rw-r--r--pixman/pixman-ppc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pixman/pixman-ppc.c b/pixman/pixman-ppc.c
index f1bea1e..a6e7bb0 100644
--- a/pixman/pixman-ppc.c
+++ b/pixman/pixman-ppc.c
@@ -37,10 +37,10 @@
static pixman_bool_t
pixman_have_vmx (void)
{
+ int error, have_vmx;
size_t length = sizeof(have_vmx);
- int error, have_mmx;
- sysctlbyname ("hw.optional.altivec", &have_vmx, &length, NULL, 0);
+ error = sysctlbyname ("hw.optional.altivec", &have_vmx, &length, NULL, 0);
if (error)
return FALSE;
@@ -56,9 +56,9 @@ pixman_have_vmx (void)
static pixman_bool_t
pixman_have_vmx (void)
{
+ int error, have_vmx;
int mib[2] = { CTL_MACHDEP, CPU_ALTIVEC };
size_t length = sizeof(have_vmx);
- int error, have_vmx;
error = sysctl (mib, 2, &have_vmx, &length, NULL, 0);