mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-04 15:30:14 +01:00
tools/record: localize a variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
8b822a84c4
commit
e511f96201
1 changed files with 3 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue