summaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorRose <83477269+AtariDreams@users.noreply.github.com>2022-10-28 12:32:09 -0400
committerJay Satiro <raysatiro@yahoo.com>2022-11-08 03:11:01 -0500
commitf151ec6c1053826bdcc740d97257d877b759e777 (patch)
tree6da9daa805268783d6b3fb75dde3cb5007ab4fb9 /lib/file.c
parent14061f784c47069d20d17dd9d6c6cf4613efeca5 (diff)
downloadcurl-f151ec6c1053826bdcc740d97257d877b759e777.tar.gz
lib: fix some type mismatches and remove unneeded typecasts
Many of these castings are unneeded if we change the variables to work better with each other. Ref: https://github.com/curl/curl/pull/9823 Closes https://github.com/curl/curl/pull/9835
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/file.c b/lib/file.c
index 4ed707883..892d25199 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -329,7 +329,7 @@ static CURLcode file_upload(struct Curl_easy *data)
while(!result) {
size_t nread;
- size_t nwrite;
+ ssize_t nwrite;
size_t readcount;
result = Curl_fillreadbuffer(data, data->set.buffer_size, &readcount);
if(result)
@@ -358,7 +358,7 @@ static CURLcode file_upload(struct Curl_easy *data)
/* write the data to the target */
nwrite = write(fd, buf2, nread);
- if(nwrite != nread) {
+ if((size_t)nwrite != nread) {
result = CURLE_SEND_ERROR;
break;
}