diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-03-03 13:07:10 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-03-05 07:10:13 +0900 |
commit | f5fbe71d956957ca7ceb6777aed05a416fc83a43 (patch) | |
tree | 67358d417604030867a979f216bbb79939a37844 /src/machine | |
parent | ef1e0b9a461c4baa12bdda47579c2c017209c3be (diff) | |
download | systemd-f5fbe71d956957ca7ceb6777aed05a416fc83a43.tar.gz |
tree-wide: use UINT64_MAX or friends
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machine-dbus.c | 2 | ||||
-rw-r--r-- | src/machine/machinectl.c | 6 | ||||
-rw-r--r-- | src/machine/machined-dbus.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 7d6e1c7163..e7c4ed3c7c 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -394,7 +394,7 @@ int bus_machine_method_get_os_release(sd_bus_message *message, void *userdata, s if (r < 0) _exit(EXIT_FAILURE); - r = copy_bytes(fd, pair[1], (uint64_t) -1, 0); + r = copy_bytes(fd, pair[1], UINT64_MAX, 0); if (r < 0) _exit(EXIT_FAILURE); diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 68d2a59e95..d7849973b8 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -964,8 +964,8 @@ static int show_pool_info(sd_bus *bus) { }; PoolStatusInfo info = { - .usage = (uint64_t) -1, - .limit = (uint64_t) -1, + .usage = UINT64_MAX, + .limit = UINT64_MAX, }; _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; @@ -2384,7 +2384,7 @@ static int set_limit(int argc, char *argv[], void *userdata) { polkit_agent_open_if_enabled(arg_transport, arg_ask_password); if (STR_IN_SET(argv[argc-1], "-", "none", "infinity")) - limit = (uint64_t) -1; + limit = UINT64_MAX; else { r = parse_size(argv[argc-1], 1024, &limit); if (r < 0) diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index bb6a2bc576..0a6ae96bc6 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -45,7 +45,7 @@ static int property_get_pool_usage( sd_bus_error *error) { _cleanup_close_ int fd = -1; - uint64_t usage = (uint64_t) -1; + uint64_t usage = UINT64_MAX; assert(bus); assert(reply); @@ -71,7 +71,7 @@ static int property_get_pool_limit( sd_bus_error *error) { _cleanup_close_ int fd = -1; - uint64_t size = (uint64_t) -1; + uint64_t size = UINT64_MAX; assert(bus); assert(reply); |