lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240823062046.3323694-3-lihongbo22@huawei.com>
Date: Fri, 23 Aug 2024 14:20:46 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: <kees@...nel.org>, <andy@...nel.org>
CC: <lihongbo22@...wei.com>, <linux-hardening@...r.kernel.org>
Subject: [PATCH -next 2/2] lib/string_choices: Add wrapper for str_false_true()

There are many "false" : "true" format in the kernel tree,
so we add str_false_true() as well.

Signed-off-by: Hongbo Li <lihongbo22@...wei.com>
---
 include/linux/string_choices.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h
index 7c74497caf2b..ebcc56b28ede 100644
--- a/include/linux/string_choices.h
+++ b/include/linux/string_choices.h
@@ -52,6 +52,7 @@ static inline const char *str_true_false(bool v)
 {
 	return v ? "true" : "false";
 }
+#define str_false_true(v)		str_true_false(!(v))
 
 /**
  * str_plural - Return the simple pluralization based on English counts
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ