summaryrefslogtreecommitdiff
path: root/tools/shared.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-02-21 10:28:56 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2020-02-24 01:53:21 +0000
commit20cf83789df6563828f16fc938ccf05437d366c2 (patch)
tree2368c5e5006887b6895a935d48000bb8e3ccfdb9 /tools/shared.c
parent2bfbdfaf6be5ccebfca38a626d5f36430c98ba13 (diff)
downloadlibinput-20cf83789df6563828f16fc938ccf05437d366c2.tar.gz
tools: constify the optarg handling of seats
This shuts up scan-build complaining about memory leaks in libinput debug-events (needs the right combination of --device option and eventually triggering usage()) and saves us a bunch of unnecessary allocations. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/shared.c')
-rw-r--r--tools/shared.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/shared.c b/tools/shared.c
index ba813fa4..e80094bc 100644
--- a/tools/shared.c
+++ b/tools/shared.c
@@ -305,11 +305,11 @@ out:
}
static struct libinput *
-tools_open_device(char **paths, bool verbose, bool *grab)
+tools_open_device(const char **paths, bool verbose, bool *grab)
{
struct libinput_device *device;
struct libinput *li;
- char **p = paths;
+ const char **p = paths;
li = libinput_path_create_context(&interface, grab);
if (!li) {
@@ -348,7 +348,7 @@ tools_setenv_quirks_dir(void)
struct libinput *
tools_open_backend(enum tools_backend which,
- char **seat_or_device,
+ const char **seat_or_device,
bool verbose,
bool *grab)
{