From: Michael Gernoth Date: Mon, 24 May 2010 09:08:56 +0000 (+0200) Subject: declare variables at the beginning of the scope X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/ad0f0d12f7625db09928da09e6417f4010b60eae declare variables at the beginning of the scope --- diff --git a/usb-driver.c b/usb-driver.c index ff47ae3..1e1f026 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -689,14 +689,16 @@ static void __attribute__ ((constructor)) libusbdriver_init(void) { setenv("XIL_IMPACT_USE_WINDRIVER", "1", 1); #if __WORDSIZE == 32 - struct utsname un; - int ret; + { + struct utsname un; + int ret; - ret = uname(&un); + ret = uname(&un); - if (ret == 0 && (!strcmp(un.machine, "x86_64"))) { - DPRINTF("setting 32bit personality\n"); - (long)syscall(SYS_personality, PER_LINUX32); + if (ret == 0 && (!strcmp(un.machine, "x86_64"))) { + DPRINTF("setting 32bit personality\n"); + (long)syscall(SYS_personality, PER_LINUX32); + } } #endif }