comparison src/joystick/bsd/SDL_sysjoystick.c @ 4401:1a7b62893c9d SDL-1.2

Fixed uninitialized variable in FreeBSD joystick. Patch by Marcus von Appen.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 05 Feb 2010 19:20:49 +0000
parents b3171b7561d8
children e978b888d87a
comparison
equal deleted inserted replaced
4400:9134017bac3a 4401:1a7b62893c9d
301 if (hw->repdesc == NULL) { 301 if (hw->repdesc == NULL) {
302 SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path, 302 SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path,
303 strerror(errno)); 303 strerror(errno));
304 goto usberr; 304 goto usberr;
305 } 305 }
306 rep = &hw->inreport;
306 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) 307 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
307 rep->rid = hid_get_report_id(fd); 308 rep->rid = hid_get_report_id(fd);
308 if (rep->rid < 0) { 309 if (rep->rid < 0) {
309 #else 310 #else
310 rep = &hw->inreport;
311 if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) { 311 if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
312 #endif 312 #endif
313 rep->rid = -1; /* XXX */ 313 rep->rid = -1; /* XXX */
314 } 314 }
315 if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) { 315 if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {