summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/cp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/cp.c b/commands/cp.c
index f2b8841121..af03615f5d 100644
--- a/commands/cp.c
+++ b/commands/cp.c
@@ -63,7 +63,7 @@ static int copy_file(const char *src, const char *dst)
while(1) {
r = read(srcfd, rw_buf, RW_BUF_SIZE);
- if (read < 0) {
+ if (r < 0) {
perror("read");
goto out;
}