diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-03-26 08:39:48 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-03-26 10:12:40 +1000 |
commit | e511f9620129ce1016fa8af4795480cad9748829 (patch) | |
tree | 7ba398183e32e993889acc0bffe482ca94feca95 | |
parent | 8b822a84c444f074d493bb3314c741a9bb03134c (diff) | |
download | libinput-e511f9620129ce1016fa8af4795480cad9748829.tar.gz |
tools/record: localize a variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | tools/libinput-record.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/libinput-record.c b/tools/libinput-record.c index 1566b10e..94f83d69 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -2042,7 +2042,6 @@ all_devices(void) { struct dirent **namelist; int ndev; - int rc; char **devices = NULL; ndev = scandir("/dev/input", &namelist, is_event_node, versionsort); @@ -2053,9 +2052,9 @@ all_devices(void) for (int i = 0; i < ndev; i++) { char *device_path; - rc = xasprintf(&device_path, - "/dev/input/%s", - namelist[i]->d_name); + int rc = xasprintf(&device_path, + "/dev/input/%s", + namelist[i]->d_name); if (rc == -1) goto error; |