X Tutup
Skip to content

Commit fd4e991

Browse files
committed
Drop parens from around already-parenthesized defines
1 parent 6d12f1b commit fd4e991

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/basic/audit-util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <stdint.h>
66
#include <sys/types.h>
77

8-
#define AUDIT_SESSION_INVALID (UINT32_MAX)
8+
#define AUDIT_SESSION_INVALID UINT32_MAX
99

1010
int audit_session_from_pid(pid_t pid, uint32_t *id);
1111
int audit_loginuid_from_pid(pid_t pid, uid_t *uid);

src/basic/cgroup-util.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ CGroupMask get_cpu_accounting_mask(void);
7575
bool cpu_accounting_is_cheap(void);
7676

7777
/* Special values for all weight knobs on unified hierarchy */
78-
#define CGROUP_WEIGHT_INVALID (UINT64_MAX)
78+
#define CGROUP_WEIGHT_INVALID UINT64_MAX
7979
#define CGROUP_WEIGHT_MIN UINT64_C(1)
8080
#define CGROUP_WEIGHT_MAX UINT64_C(10000)
8181
#define CGROUP_WEIGHT_DEFAULT UINT64_C(100)
8282

8383
#define CGROUP_LIMIT_MIN UINT64_C(0)
84-
#define CGROUP_LIMIT_MAX (UINT64_MAX)
84+
#define CGROUP_LIMIT_MAX UINT64_MAX
8585

8686
static inline bool CGROUP_WEIGHT_IS_OK(uint64_t x) {
8787
return
@@ -106,7 +106,7 @@ const char* cgroup_io_limit_type_to_string(CGroupIOLimitType t) _const_;
106106
CGroupIOLimitType cgroup_io_limit_type_from_string(const char *s) _pure_;
107107

108108
/* Special values for the cpu.shares attribute */
109-
#define CGROUP_CPU_SHARES_INVALID (UINT64_MAX)
109+
#define CGROUP_CPU_SHARES_INVALID UINT64_MAX
110110
#define CGROUP_CPU_SHARES_MIN UINT64_C(2)
111111
#define CGROUP_CPU_SHARES_MAX UINT64_C(262144)
112112
#define CGROUP_CPU_SHARES_DEFAULT UINT64_C(1024)
@@ -118,7 +118,7 @@ static inline bool CGROUP_CPU_SHARES_IS_OK(uint64_t x) {
118118
}
119119

120120
/* Special values for the blkio.weight attribute */
121-
#define CGROUP_BLKIO_WEIGHT_INVALID (UINT64_MAX)
121+
#define CGROUP_BLKIO_WEIGHT_INVALID UINT64_MAX
122122
#define CGROUP_BLKIO_WEIGHT_MIN UINT64_C(10)
123123
#define CGROUP_BLKIO_WEIGHT_MAX UINT64_C(1000)
124124
#define CGROUP_BLKIO_WEIGHT_DEFAULT UINT64_C(500)

src/basic/string-util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ char *strnappend(const char *s, const char *suffix, size_t b) {
7171
assert(suffix);
7272

7373
a = strlen(s);
74-
if (b > (SIZE_MAX) - a)
74+
if (b > SIZE_MAX - a)
7575
return NULL;
7676

7777
r = new(char, a+b+1);

src/libsystemd/sd-bus/bus-message.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static void *message_extend_fields(sd_bus_message *m, size_t align, size_t sz, b
162162
new_size = start + sz;
163163

164164
if (new_size < start ||
165-
new_size > (size_t) (UINT32_MAX))
165+
new_size > (size_t) UINT32_MAX)
166166
goto poison;
167167

168168
if (old_size == new_size)
@@ -1337,7 +1337,7 @@ static void *message_extend_body(
13371337
added = padding + sz;
13381338

13391339
/* Check for 32bit overflows */
1340-
if (end_body > (size_t) (UINT32_MAX) ||
1340+
if (end_body > (size_t) UINT32_MAX ||
13411341
end_body < start_body) {
13421342
m->poisoned = true;
13431343
return NULL;

src/shared/nsflags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
CLONE_NEWUSER| \
1717
CLONE_NEWUTS))
1818

19-
#define NAMESPACE_FLAGS_INITIAL (ULONG_MAX)
19+
#define NAMESPACE_FLAGS_INITIAL ULONG_MAX
2020

2121
int namespace_flags_from_string(const char *name, unsigned long *ret);
2222
int namespace_flags_to_string(unsigned long flags, char **ret);

src/systemd/sd-lldp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ enum {
8181
SD_LLDP_SYSTEM_CAPABILITIES_TPMR = 1 << 10,
8282
};
8383

84-
#define SD_LLDP_SYSTEM_CAPABILITIES_ALL (UINT16_MAX)
84+
#define SD_LLDP_SYSTEM_CAPABILITIES_ALL UINT16_MAX
8585

8686
#define SD_LLDP_SYSTEM_CAPABILITIES_ALL_ROUTERS \
8787
((uint16_t) \

0 commit comments

Comments
 (0)
X Tutup