summaryrefslogtreecommitdiff
path: root/tools/interactive-evdev.c
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-06-28 09:50:47 +0300
committerRan Benita <ran@unusedvar.com>2020-06-28 09:50:47 +0300
commit878cc7a57495fa0bc1fbcb7cc666ad75cb6cdb65 (patch)
treed997835a8125a79d5d8b74267e98ff0241383f62 /tools/interactive-evdev.c
parent8b8a464576789b13e2d48d4ede662acac3141263 (diff)
downloadxorg-lib-libxkbcommon-878cc7a57495fa0bc1fbcb7cc666ad75cb6cdb65.tar.gz
tools: don't depend on src/utils.h
The idea is to make the tools/demos as standalone as possible so that they may serve as examples as well. Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'tools/interactive-evdev.c')
-rw-r--r--tools/interactive-evdev.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/interactive-evdev.c b/tools/interactive-evdev.c
index e09da6a..e8afb5e 100644
--- a/tools/interactive-evdev.c
+++ b/tools/interactive-evdev.c
@@ -459,11 +459,11 @@ main(int argc, char *argv[])
}
else {
struct xkb_rule_names rmlvo = {
- .rules = isempty(rules) ? NULL : rules,
- .model = isempty(model) ? NULL : model,
- .layout = isempty(layout) ? NULL : layout,
- .variant = isempty(variant) ? NULL : variant,
- .options = isempty(options) ? NULL : options
+ .rules = (rules == NULL || rules[0] == '\0') ? NULL : rules,
+ .model = (model == NULL || model[0] == '\0') ? NULL : model,
+ .layout = (layout == NULL || layout[0] == '\0') ? NULL : layout,
+ .variant = (variant == NULL || variant[0] == '\0') ? NULL : variant,
+ .options = (options == NULL || options[0] == '\0') ? NULL : options
};
if (!rules && !model && !layout && !variant && !options)