declare variables at the beginning of the scope
authorMichael Gernoth <michael@gernoth.net>
Mon, 24 May 2010 09:08:56 +0000 (11:08 +0200)
committerMichael Gernoth <michael@gernoth.net>
Mon, 24 May 2010 09:08:56 +0000 (11:08 +0200)
usb-driver.c

index ff47ae3341c2595a371a8671ae9a767b003156d8..1e1f026bbdb342c4eadae64988bf4754df35aed1 100644 (file)
@@ -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
 }
Impressum, Datenschutz