From 20cf83789df6563828f16fc938ccf05437d366c2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 21 Feb 2020 10:28:56 +1000 Subject: 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 --- tools/shared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/shared.c') 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) { -- cgit v1.2.1