Merged r5547:5548 from branches/SDL-1.2: FreeBSD joystick uninit'd var fix.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 05 Feb 2010 19:23:59 +0000
changeset 3703 df65ae8f32e8
parent 3702 6604099437ac
child 3704 9bc9ff36eb8f
Merged r5547:5548 from branches/SDL-1.2: FreeBSD joystick uninit'd var fix.
src/joystick/bsd/SDL_sysjoystick.c
--- a/src/joystick/bsd/SDL_sysjoystick.c	Mon Feb 01 02:52:19 2010 +0000
+++ b/src/joystick/bsd/SDL_sysjoystick.c	Fri Feb 05 19:23:59 2010 +0000
@@ -307,11 +307,11 @@
                      strerror(errno));
         goto usberr;
     }
+    rep = &hw->inreport;
 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
     rep->rid = hid_get_report_id(fd);
     if (rep->rid < 0) {
 #else
-    rep = &hw->inreport;
     if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
 #endif
         rep->rid = -1;          /* XXX */