mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
Drop parens from around already-parenthesized defines
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define AUDIT_SESSION_INVALID (UINT32_MAX)
|
||||
#define AUDIT_SESSION_INVALID UINT32_MAX
|
||||
|
||||
int audit_session_from_pid(pid_t pid, uint32_t *id);
|
||||
int audit_loginuid_from_pid(pid_t pid, uid_t *uid);
|
||||
|
||||
@@ -75,13 +75,13 @@ CGroupMask get_cpu_accounting_mask(void);
|
||||
bool cpu_accounting_is_cheap(void);
|
||||
|
||||
/* Special values for all weight knobs on unified hierarchy */
|
||||
#define CGROUP_WEIGHT_INVALID (UINT64_MAX)
|
||||
#define CGROUP_WEIGHT_INVALID UINT64_MAX
|
||||
#define CGROUP_WEIGHT_MIN UINT64_C(1)
|
||||
#define CGROUP_WEIGHT_MAX UINT64_C(10000)
|
||||
#define CGROUP_WEIGHT_DEFAULT UINT64_C(100)
|
||||
|
||||
#define CGROUP_LIMIT_MIN UINT64_C(0)
|
||||
#define CGROUP_LIMIT_MAX (UINT64_MAX)
|
||||
#define CGROUP_LIMIT_MAX UINT64_MAX
|
||||
|
||||
static inline bool CGROUP_WEIGHT_IS_OK(uint64_t x) {
|
||||
return
|
||||
@@ -106,7 +106,7 @@ const char* cgroup_io_limit_type_to_string(CGroupIOLimitType t) _const_;
|
||||
CGroupIOLimitType cgroup_io_limit_type_from_string(const char *s) _pure_;
|
||||
|
||||
/* Special values for the cpu.shares attribute */
|
||||
#define CGROUP_CPU_SHARES_INVALID (UINT64_MAX)
|
||||
#define CGROUP_CPU_SHARES_INVALID UINT64_MAX
|
||||
#define CGROUP_CPU_SHARES_MIN UINT64_C(2)
|
||||
#define CGROUP_CPU_SHARES_MAX UINT64_C(262144)
|
||||
#define CGROUP_CPU_SHARES_DEFAULT UINT64_C(1024)
|
||||
@@ -118,7 +118,7 @@ static inline bool CGROUP_CPU_SHARES_IS_OK(uint64_t x) {
|
||||
}
|
||||
|
||||
/* Special values for the blkio.weight attribute */
|
||||
#define CGROUP_BLKIO_WEIGHT_INVALID (UINT64_MAX)
|
||||
#define CGROUP_BLKIO_WEIGHT_INVALID UINT64_MAX
|
||||
#define CGROUP_BLKIO_WEIGHT_MIN UINT64_C(10)
|
||||
#define CGROUP_BLKIO_WEIGHT_MAX UINT64_C(1000)
|
||||
#define CGROUP_BLKIO_WEIGHT_DEFAULT UINT64_C(500)
|
||||
|
||||
@@ -71,7 +71,7 @@ char *strnappend(const char *s, const char *suffix, size_t b) {
|
||||
assert(suffix);
|
||||
|
||||
a = strlen(s);
|
||||
if (b > (SIZE_MAX) - a)
|
||||
if (b > SIZE_MAX - a)
|
||||
return NULL;
|
||||
|
||||
r = new(char, a+b+1);
|
||||
|
||||
@@ -162,7 +162,7 @@ static void *message_extend_fields(sd_bus_message *m, size_t align, size_t sz, b
|
||||
new_size = start + sz;
|
||||
|
||||
if (new_size < start ||
|
||||
new_size > (size_t) (UINT32_MAX))
|
||||
new_size > (size_t) UINT32_MAX)
|
||||
goto poison;
|
||||
|
||||
if (old_size == new_size)
|
||||
@@ -1337,7 +1337,7 @@ static void *message_extend_body(
|
||||
added = padding + sz;
|
||||
|
||||
/* Check for 32bit overflows */
|
||||
if (end_body > (size_t) (UINT32_MAX) ||
|
||||
if (end_body > (size_t) UINT32_MAX ||
|
||||
end_body < start_body) {
|
||||
m->poisoned = true;
|
||||
return NULL;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
CLONE_NEWUSER| \
|
||||
CLONE_NEWUTS))
|
||||
|
||||
#define NAMESPACE_FLAGS_INITIAL (ULONG_MAX)
|
||||
#define NAMESPACE_FLAGS_INITIAL ULONG_MAX
|
||||
|
||||
int namespace_flags_from_string(const char *name, unsigned long *ret);
|
||||
int namespace_flags_to_string(unsigned long flags, char **ret);
|
||||
|
||||
@@ -81,7 +81,7 @@ enum {
|
||||
SD_LLDP_SYSTEM_CAPABILITIES_TPMR = 1 << 10,
|
||||
};
|
||||
|
||||
#define SD_LLDP_SYSTEM_CAPABILITIES_ALL (UINT16_MAX)
|
||||
#define SD_LLDP_SYSTEM_CAPABILITIES_ALL UINT16_MAX
|
||||
|
||||
#define SD_LLDP_SYSTEM_CAPABILITIES_ALL_ROUTERS \
|
||||
((uint16_t) \
|
||||
|
||||
Reference in New Issue
Block a user