# HG changeset patch # User Ryan C. Gordon # Date 1265397649 0 # Node ID 1a7b62893c9d2b123c5356b932dee6facad15bb7 # Parent 9134017bac3a5a3a8aa1c70aa0643a2297fbfd22 Fixed uninitialized variable in FreeBSD joystick. Patch by Marcus von Appen. diff -r 9134017bac3a -r 1a7b62893c9d src/joystick/bsd/SDL_sysjoystick.c --- a/src/joystick/bsd/SDL_sysjoystick.c Sun Jan 24 20:08:14 2010 +0000 +++ b/src/joystick/bsd/SDL_sysjoystick.c Fri Feb 05 19:20:49 2010 +0000 @@ -303,11 +303,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 */