summaryrefslogtreecommitdiff
path: root/src/dissect
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-03-03 13:07:10 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-03-05 07:10:13 +0900
commitf5fbe71d956957ca7ceb6777aed05a416fc83a43 (patch)
tree67358d417604030867a979f216bbb79939a37844 /src/dissect
parentef1e0b9a461c4baa12bdda47579c2c017209c3be (diff)
downloadsystemd-f5fbe71d956957ca7ceb6777aed05a416fc83a43.tar.gz
tree-wide: use UINT64_MAX or friends
Diffstat (limited to 'src/dissect')
-rw-r--r--src/dissect/dissect.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c
index 85102d3efa..b9adbb6f7f 100644
--- a/src/dissect/dissect.c
+++ b/src/dissect/dissect.c
@@ -627,7 +627,7 @@ static int action_copy(DissectedImage *m, LoopDevice *d) {
/* Copying to stdout? */
if (streq(arg_target, "-")) {
- r = copy_bytes(source_fd, STDOUT_FILENO, (uint64_t) -1, COPY_REFLINK);
+ r = copy_bytes(source_fd, STDOUT_FILENO, UINT64_MAX, COPY_REFLINK);
if (r < 0)
return log_error_errno(r, "Failed to copy bytes from %s in mage '%s' to stdout: %m", arg_source, arg_image);
@@ -653,7 +653,7 @@ static int action_copy(DissectedImage *m, LoopDevice *d) {
if (target_fd < 0)
return log_error_errno(errno, "Failed to create regular file at target path '%s': %m", arg_target);
- r = copy_bytes(source_fd, target_fd, (uint64_t) -1, COPY_REFLINK);
+ r = copy_bytes(source_fd, target_fd, UINT64_MAX, COPY_REFLINK);
if (r < 0)
return log_error_errno(r, "Failed to copy bytes from %s in mage '%s' to '%s': %m", arg_source, arg_image, arg_target);
@@ -684,7 +684,7 @@ static int action_copy(DissectedImage *m, LoopDevice *d) {
if (target_fd < 0)
return log_error_errno(errno, "Failed to open target file '%s': %m", arg_target);
- r = copy_bytes(STDIN_FILENO, target_fd, (uint64_t) -1, COPY_REFLINK);
+ r = copy_bytes(STDIN_FILENO, target_fd, UINT64_MAX, COPY_REFLINK);
if (r < 0)
return log_error_errno(r, "Failed to copy bytes from stdin to '%s' in image '%s': %m", arg_target, arg_image);
@@ -722,7 +722,7 @@ static int action_copy(DissectedImage *m, LoopDevice *d) {
if (target_fd < 0)
return log_error_errno(errno, "Failed to open target file '%s': %m", arg_target);
- r = copy_bytes(source_fd, target_fd, (uint64_t) -1, COPY_REFLINK);
+ r = copy_bytes(source_fd, target_fd, UINT64_MAX, COPY_REFLINK);
if (r < 0)
return log_error_errno(r, "Failed to copy bytes from '%s' to '%s' in image '%s': %m", arg_source, arg_target, arg_image);