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-11-09 16:13:31 -0500
commitb2e0e240fec4a8eaa7fe8da3a6807bcb8ac97edf (patch)
treec6519b0b24697f2598dadddfc1d89c7f5427b7f6
parent400436dc52450359de35cac9efa6aea631cf34e9 (diff)
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 f1bea1ea..a6e7bb0c 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);