X-Git-Url: http://git.scottworley.com/keystroke-timestamps/blobdiff_plain/7c9f27edf74be0155ae6a1682fdc6a8555846c83..b32f62cff30c6d02dcf89a5cfdb0215a044ce519:/keystroke-timestamps.c diff --git a/keystroke-timestamps.c b/keystroke-timestamps.c index 037919f..d7aeaf6 100644 --- a/keystroke-timestamps.c +++ b/keystroke-timestamps.c @@ -40,14 +40,14 @@ int main (int argc, char **argv) err(EX_NOINPUT, "Could not glob keyboard event file(s): %s", device); } for (unsigned i = 0; i < glob_result.gl_pathc; i++) { - int open_fd = open(glob_result.gl_pathv[i], O_RDONLY); - if (open_fd < 0) { + int device_fd = open(glob_result.gl_pathv[i], O_RDONLY); + if (device_fd < 0) { err(EX_NOINPUT, "Could not open keyboard event file: %s", glob_result.gl_pathv[i]); } - if (open_fd > maxfd) { - maxfd = open_fd; + if (device_fd > maxfd) { + maxfd = device_fd; } - FD_SET(open_fd, &all_inputs); + FD_SET(device_fd, &all_inputs); } globfree(&glob_result);