]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/copy: remove unnecessary cast
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 2 Apr 2016 22:20:12 +0000 (18:20 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 2 Apr 2016 22:58:21 +0000 (18:58 -0400)
Both types are unsigned, so the cast to the longer type is automatic.

src/basic/copy.c

index 10c03a8b52f80eb0b2d7beade046f64b41195c01..e2db4be9ff4deb96605f56ad8fe66e4e0ab93987 100644 (file)
@@ -94,8 +94,8 @@ int copy_bytes(int fdf, int fdt, uint64_t max_bytes, bool try_reflink) {
                         if (max_bytes <= 0)
                                 return 1; /* return > 0 if we hit the max_bytes limit */
 
-                        if ((uint64_t) m > max_bytes)
-                                m = (size_t) max_bytes;
+                        if (m > max_bytes)
+                                m = max_bytes;
                 }
 
                 /* First try copy_file_range(), unless we already tried */