mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 20:49:01 -04:00
toread is unsigned, it won't ever fall < 0.
This commit is contained in:
parent
3ae9bb7ae9
commit
1f4aec43d9
@ -974,7 +974,7 @@ http_file_read(struct http_file *file, void *buf, size_t len)
|
||||
|
||||
off = file->position + file->offset;
|
||||
toread = MIN(len, (file->length - file->offset));
|
||||
if (toread <= 0)
|
||||
if (toread == 0)
|
||||
return (0);
|
||||
|
||||
if (file->req->http_body_fd != -1) {
|
||||
@ -1198,7 +1198,7 @@ http_body_read(struct http_request *req, void *out, size_t len)
|
||||
size_t toread;
|
||||
|
||||
toread = MIN(req->http_body_length, len);
|
||||
if (toread <= 0)
|
||||
if (toread == 0)
|
||||
return (0);
|
||||
|
||||
if (req->http_body_fd != -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user