diff options
author | Collin Funk <collin.funk1@gmail.com> | 2024-02-13 02:52:58 +0000 |
---|---|---|
committer | Mitchell Horne <mhorne@FreeBSD.org> | 2024-03-21 14:43:04 +0000 |
commit | 8b864151856fbba97fed16b1200248cf9f6f3ccf (patch) | |
tree | 446191402b1f0f5298c9f1ddd0307340aa1b5182 | |
parent | 501f7e7bf847c66e3869b533805e76897e4685b9 (diff) | |
download | src-8b864151856fbba97fed16b1200248cf9f6f3ccf.tar.gz src-8b864151856fbba97fed16b1200248cf9f6f3ccf.zip |
cp: Remove useless ssize_t cast
Both wcount and wresid are ssize_t so this cast is not needed. Just
remove it so the code is easier to read.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: emaste, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1116
-rw-r--r-- | bin/cp/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 80a0c1fce824..6c99d4c63f4a 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -91,7 +91,7 @@ copy_fallback(int from_fd, int to_fd) wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; - if (wcount >= (ssize_t)wresid) + if (wcount >= wresid) break; } return (wcount < 0 ? wcount : rcount); |