Re: dinput: Remove unused variables
15 Apr
2008
15 Apr
'08
8:44 p.m.
Andrew Talbot wrote:
@@ -142,13 +142,12 @@ static INT find_joystick_devices(void) { CHAR device_name[MAX_PATH], *str; INT len; - int fd;
len = sprintf(device_name, "%s%d", JOYDEV_NEW, i) + 1; - if ((fd = open(device_name, O_RDONLY)) < 0) + if (open(device_name, O_RDONLY) < 0) { len = sprintf(device_name, "%s%d", JOYDEV_OLD, i) + 1; - if ((fd = open(device_name, O_RDONLY)) < 0) continue; + if (open(device_name, O_RDONLY) < 0) continue; }
if (!(str = HeapAlloc(GetProcessHeap(), 0, len))) break;
Again, this needs to be fixed in another way as fd is being leaked. -- Rob Shearman
6457
Age (days ago)
6457
Last active (days ago)
1 comments
2 participants
participants (2)
-
Andrew Talbot -
Robert Shearman