From 74b1a9ccf9a7eab1d4c4c0e4ffc2e901bc040e48 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 12 Feb 2024 18:52:58 -0800 Subject: [PATCH] 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 Reviewed by: emaste, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1116 (cherry picked from commit 8b864151856fbba97fed16b1200248cf9f6f3ccf) --- bin/cp/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 0bb5157e3f5736..353d352148441c 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -97,7 +97,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);