]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/import/export-tar.c
tree-wide: use UINT64_MAX or friends
[thirdparty/systemd.git] / src / import / export-tar.c
index 1e6b2c12683f594de9a24e7e76a109d556a4f0a3..b734c3004a7158deca8ea529c4cf5c3efc6ffb9f 100644 (file)
@@ -97,8 +97,8 @@ int tar_export_new(
                 .tar_fd = -1,
                 .on_finished = on_finished,
                 .userdata = userdata,
-                .quota_referenced = (uint64_t) -1,
-                .last_percent = (unsigned) -1,
+                .quota_referenced = UINT64_MAX,
+                .last_percent = UINT_MAX,
                 .progress_ratelimit = { 100 * USEC_PER_MSEC, 1 },
         };
 
@@ -120,7 +120,7 @@ static void tar_export_report_progress(TarExport *e) {
         assert(e);
 
         /* Do we have any quota info? If not, we don't know anything about the progress */
-        if (e->quota_referenced == (uint64_t) -1)
+        if (e->quota_referenced == UINT64_MAX)
                 return;
 
         if (e->written_uncompressed >= e->quota_referenced)
@@ -281,7 +281,7 @@ int tar_export_start(TarExport *e, const char *path, int fd, ImportCompressType
         if (r < 0)
                 return r;
 
-        e->quota_referenced = (uint64_t) -1;
+        e->quota_referenced = UINT64_MAX;
 
         if (btrfs_might_be_subvol(&e->st)) {
                 BtrfsQuotaInfo q;