]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 5 May 2018 02:07:37 +0000 (11:07 +0900)
We always ignore the unused bits. So, it is not necessary to check
them.

src/core/dbus-execute.c
src/shared/nsflags.h

index e36a050bdd82d76970e4c174d14c58f20e244a0a..afe7545a0e30d35c89b4b3f24d2809110c8db1eb 100644 (file)
@@ -1207,7 +1207,7 @@ static BUS_DEFINE_SET_TRANSIENT_PARSE_PTR(personality, unsigned long, parse_pers
 static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(secure_bits, "i", int32_t, int, "%" PRIi32, secure_bits_to_string_alloc_with_check);
 static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(capability, "t", uint64_t, uint64_t, "%" PRIu64, capability_set_to_string_alloc);
 static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(sched_policy, "i", int32_t, int, "%" PRIi32, sched_policy_to_string_alloc_with_check);
-static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(namespace_flag, "t", uint64_t, unsigned long, "%" PRIu64, namespace_flag_to_string_many_with_check);
+static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(namespace_flag, "t", uint64_t, unsigned long, "%" PRIu64, namespace_flag_to_string_many);
 static BUS_DEFINE_SET_TRANSIENT_TO_STRING(mount_flags, "t", uint64_t, unsigned long, "%" PRIu64, mount_propagation_flags_to_string_with_check);
 
 int bus_exec_context_set_transient_property(
index c5bc83e7233c0c9c08b5b621a749ba7c7df5bd82..fb4b249d94cc1ffeb8c0fd0342baa03c83902a8a 100644 (file)
@@ -29,13 +29,6 @@ unsigned long namespace_flag_from_string(const char *name);
 int namespace_flag_from_string_many(const char *name, unsigned long *ret);
 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;