summaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2017-03-10 14:28:37 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-03-13 23:11:45 +0100
commit66de563482c0fd4324e1eae19809d2499e3c4fa8 (patch)
treebf3178878ebe2461388e8fec01e321173ffe30f8 /lib/file.c
parentdb87bcfcf21f8c3b8188d0c5ab82faf804ffd5ea (diff)
downloadcurl-66de563482c0fd4324e1eae19809d2499e3c4fa8.tar.gz
Improve code readbility
... by removing the else branch after a return, break or continue. Closes #1310
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/file.c b/lib/file.c
index e90902c50..b26bdeafc 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -355,8 +355,7 @@ static CURLcode file_upload(struct connectdata *conn)
failf(data, "Can't get the size of %s", file->path);
return CURLE_WRITE_ERROR;
}
- else
- data->state.resume_from = (curl_off_t)file_stat.st_size;
+ data->state.resume_from = (curl_off_t)file_stat.st_size;
}
while(!result) {
@@ -519,8 +518,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
failf(data, "Can't get the size of file.");
return CURLE_READ_ERROR;
}
- else
- data->state.resume_from += (curl_off_t)statbuf.st_size;
+ data->state.resume_from += (curl_off_t)statbuf.st_size;
}
if(data->state.resume_from <= expected_size)