Commit f5c1ca3a authored by Kees Cook's avatar Kees Cook

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: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240812182939.work.424-kees@kernel.orgReviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarKees Cook <kees@kernel.org>
parent 9b97452b
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment