Commit e0152e85 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: snprintf zero-terminates string no need to do it explicitly.

parent ae26ca6c
......@@ -221,15 +221,15 @@ static void find_joydevs(void)
/* Someone beat us to it */
return;
for (i=0;i<MAX_JOYDEV;i++) {
char buf[MAX_PATH];
struct JoyDev joydev = {0};
int fd;
int no_ff_check = 0;
int j;
snprintf(buf,MAX_PATH,EVDEVPREFIX"%d",i);
buf[MAX_PATH-1] = 0;
for (i = 0; i < MAX_JOYDEV; i++)
{
char buf[MAX_PATH];
struct JoyDev joydev = {0};
int fd;
int no_ff_check = 0;
int j;
snprintf(buf, sizeof(buf), EVDEVPREFIX"%d", i);
if ((fd=open(buf, O_RDWR))==-1) {
fd = open(buf, O_RDONLY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment