summaryrefslogtreecommitdiff
path: root/tools/libinput-list-devices.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-05-26 08:46:05 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-05-26 08:46:05 +1000
commit0ca29c6ddc6e18d8d7babfac64e6d0c1c1ecfeca (patch)
treed054f5922c970815ff2b16dda638ac2cb6310932 /tools/libinput-list-devices.c
parentc4be027b90040d04488d1e41bf311ec88e44c555 (diff)
downloadlibinput-0ca29c6ddc6e18d8d7babfac64e6d0c1c1ecfeca.tar.gz
Add streq() helper to use instead of strcmp() == 0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/libinput-list-devices.c')
-rw-r--r--tools/libinput-list-devices.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c
index 825969d5..66251731 100644
--- a/tools/libinput-list-devices.c
+++ b/tools/libinput-list-devices.c
@@ -30,6 +30,7 @@
#include <libudev.h>
#include <libinput.h>
+#include <libinput-util.h>
#include <libinput-version.h>
#include "shared.h"
@@ -279,10 +280,10 @@ main(int argc, char **argv)
struct libinput_event *ev;
if (argc > 1) {
- if (strcmp(argv[1], "--help") == 0) {
+ if (streq(argv[1], "--help")) {
usage();
return 0;
- } else if (strcmp(argv[1], "--version") == 0) {
+ } else if (streq(argv[1], "--version")) {
printf("%s\n", LIBINPUT_VERSION);
return 0;
} else {