mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-06-09 22:38:22 +02:00
udev: use xclose() instead of close()
xclose does the fd == -1 dance which makes analyzers happier. Co-Authored-by: Claude Code <noreply@anthropic.com> Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
This commit is contained in:
parent
c276c9579e
commit
20b52ffafc
2 changed files with 4 additions and 2 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "util-files.h"
|
||||
#include "util-macros.h"
|
||||
#include "util-prop-parsers.h"
|
||||
|
||||
|
|
@ -77,7 +78,7 @@ handle_absfuzz(struct udev_device *device)
|
|||
}
|
||||
|
||||
out:
|
||||
close(fd);
|
||||
xclose(&fd);
|
||||
libevdev_free(evdev);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "util-files.h"
|
||||
#include "util-macros.h"
|
||||
|
||||
static void
|
||||
|
|
@ -75,7 +76,7 @@ reset_absfuzz_to_zero(struct udev_device *device)
|
|||
}
|
||||
|
||||
out:
|
||||
close(fd);
|
||||
xclose(&fd);
|
||||
libevdev_free(evdev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue