Skip to content

Commit

Permalink
cp: Remove useless ssize_t cast
Browse files Browse the repository at this point in the history
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:	#1116

(cherry picked from commit 8b86415)
  • Loading branch information
collinfunk authored and mhorne committed Apr 18, 2024
1 parent 5f375fd commit 74b1a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cp/utils.c
Expand Up @@ -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);
Expand Down

0 comments on commit 74b1a9c

Please sign in to comment.