chiark / gitweb /
nsflags: drop namespace_flag_to_string_many_with_check()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 May 2018 01:44:19 +0000 (10:44 +0900)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
We always ignore the unused bits. So, it is not necessary to check
them.

src/shared/nsflags.h

index 297b4ccc69def9b73e6b0e0ccc7bd1a1705094e5..d34b79f961bdcd0c4e04e103034e59f398fa365b 100644 (file)
@@ -31,13 +31,6 @@ int namespace_flag_from_string_many(const char *name, unsigned long *ret);
 #endif // 0
 int namespace_flag_to_string_many(unsigned long flags, char **ret);
 
-static inline int namespace_flag_to_string_many_with_check(unsigned long n, char **s) {
-        if ((n & NAMESPACE_FLAGS_ALL) != n)
-                return -EINVAL;
-
-        return namespace_flag_to_string_many(n, s);
-}
-
 struct namespace_flag_map {
         unsigned long flag;
         const char *name;