diff options
author | 2024-08-12 11:29:40 -0700 | |
---|---|---|
committer | 2024-08-15 09:26:02 -0700 | |
commit | f5c1ca3a15fdb867d2b535003f74e0b975eff116 (patch) | |
tree | 617df1f8d6b8021b5337904816ecb9ff759827f9 | |
parent | coccinelle: Add rules to find str_up_down() replacements (diff) | |
download | wireguard-linux-f5c1ca3a15fdb867d2b535003f74e0b975eff116.tar.xz wireguard-linux-f5c1ca3a15fdb867d2b535003f74e0b975eff116.zip |
string_choices: Add wrapper for str_down_up()
The string choice functions which are not clearly true/false synonyms
also have inverted wrappers. Add this for str_down_up() as well.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240812182939.work.424-kees@kernel.org
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | include/linux/string_choices.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index bcde3c9cff81..1320bcdcb89c 100644 --- a/include/linux/string_choices.h +++ b/include/linux/string_choices.h @@ -46,6 +46,7 @@ static inline const char *str_up_down(bool v) { return v ? "up" : "down"; } +#define str_down_up(v) str_up_down(!(v)) /** * str_plural - Return the simple pluralization based on English counts |