Skip to content

Commit f5c1ca3

Browse files
committed
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Kees Cook <[email protected]>
1 parent 9b97452 commit f5c1ca3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/linux/string_choices.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static inline const char *str_up_down(bool v)
4646
{
4747
return v ? "up" : "down";
4848
}
49+
#define str_down_up(v) str_up_down(!(v))
4950

5051
/**
5152
* str_plural - Return the simple pluralization based on English counts

0 commit comments

Comments
 (0)