summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/basic/audit-util.h2
-rw-r--r--src/basic/cgroup-util.h8
-rw-r--r--src/basic/string-util.c2
-rw-r--r--src/libsystemd/sd-bus/bus-message.c4
-rw-r--r--src/shared/nsflags.h2
-rw-r--r--src/systemd/sd-lldp.h2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/basic/audit-util.h b/src/basic/audit-util.h
index 765f3f4f63..964082bac6 100644
--- a/src/basic/audit-util.h
+++ b/src/basic/audit-util.h
@@ -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);
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
index 11deae2d20..888c0f6723 100644
--- a/src/basic/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -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)
diff --git a/src/basic/string-util.c b/src/basic/string-util.c
index c369f59ee1..058eec54ff 100644
--- a/src/basic/string-util.c
+++ b/src/basic/string-util.c
@@ -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);
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index fba1dbbd7d..040206026f 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -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;
diff --git a/src/shared/nsflags.h b/src/shared/nsflags.h
index 8d194bf1b7..a35332dd97 100644
--- a/src/shared/nsflags.h
+++ b/src/shared/nsflags.h
@@ -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);
diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h
index 66e4075b5c..e48e29fbc0 100644
--- a/src/systemd/sd-lldp.h
+++ b/src/systemd/sd-lldp.h
@@ -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) \