From e511f9620129ce1016fa8af4795480cad9748829 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 26 Mar 2021 08:39:48 +1000 Subject: [PATCH] tools/record: localize a variable Signed-off-by: Peter Hutterer --- tools/libinput-record.c | 7 +++---- 1 file 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;