diff options
author | Rose <83477269+AtariDreams@users.noreply.github.com> | 2022-10-28 12:32:09 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2022-11-08 03:11:01 -0500 |
commit | f151ec6c1053826bdcc740d97257d877b759e777 (patch) | |
tree | 6da9daa805268783d6b3fb75dde3cb5007ab4fb9 /lib/file.c | |
parent | 14061f784c47069d20d17dd9d6c6cf4613efeca5 (diff) | |
download | curl-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.c | 4 |
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; } |