From: Zbigniew Jędrzejewski-Szmek Date: Sat, 2 Apr 2016 22:20:12 +0000 (-0400) Subject: basic/copy: remove unnecessary cast X-Git-Tag: v230~209^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d219849e60db7096bfb111c9ec2555d825bf0c95;p=thirdparty%2Fsystemd.git basic/copy: remove unnecessary cast Both types are unsigned, so the cast to the longer type is automatic. --- diff --git a/src/basic/copy.c b/src/basic/copy.c index 10c03a8b52f..e2db4be9ff4 100644 --- a/src/basic/copy.c +++ b/src/basic/copy.c @@ -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 */