diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-27 21:13:08 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-02 16:29:11 -0400 |
commit | 2c201c2140f9a75f3698e988880f00f8d0492315 (patch) | |
tree | 28f9835b7720692a60dda9b88a598994a03b396c /shell-completion | |
parent | 829257d135c496bd5d2770036c449445f77e0abc (diff) | |
download | systemd-2c201c2140f9a75f3698e988880f00f8d0492315.tar.gz |
meson: use booleans for conf.set and drop unecessary conditionals
Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.
Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/meson.build | 2 | ||||
-rw-r--r-- | shell-completion/zsh/meson.build | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/shell-completion/bash/meson.build b/shell-completion/bash/meson.build index 8c2eada6cb..9399661845 100644 --- a/shell-completion/bash/meson.build +++ b/shell-completion/bash/meson.build @@ -42,7 +42,7 @@ if bashcompletiondir != 'no' ] foreach item : items - if item[1] == '' or conf.get(item[1], 0) == 1 + if item[1] == '' or conf.get(item[1], false) install_data(item[0], install_dir : bashcompletiondir) endif diff --git a/shell-completion/zsh/meson.build b/shell-completion/zsh/meson.build index ed1513ed25..34408ce90d 100644 --- a/shell-completion/zsh/meson.build +++ b/shell-completion/zsh/meson.build @@ -39,7 +39,7 @@ if zshcompletiondir != 'no' ] foreach item : items - if item[1] == '' or conf.get(item[1], 0) == 1 + if item[1] == '' or conf.get(item[1], false) install_data(item[0], install_dir : zshcompletiondir) endif |