| ... | ... | @@ -5601,7 +5601,9 @@ pub fn sendfile( |
| 5601 | 5601 | hdtr = &hdtr_data; |
| 5602 | 5602 | } |
| 5603 | 5603 | |
| 5604 | | const adjusted_count = @minimum(in_len, @as(u63, max_count)); |
| 5604 | const adjusted_count_temporary = @minimum(in_len, @as(u63, max_count)); |
| 5605 | // TODO we should not need this int cast; improve the return type of `@minimum` |
| 5606 | const adjusted_count = @intCast(u63, adjusted_count_temporary); |
| 5605 | 5607 | |
| 5606 | 5608 | while (true) { |
| 5607 | 5609 | var sbytes: off_t = adjusted_count; |
| ... | ... | @@ -5655,7 +5657,9 @@ pub fn sendfile( |
| 5655 | 5657 | rw: { |
| 5656 | 5658 | var buf: [8 * 4096]u8 = undefined; |
| 5657 | 5659 | // Here we match BSD behavior, making a zero count value send as many bytes as possible. |
| 5658 | | const adjusted_count = if (in_len == 0) buf.len else @minimum(buf.len, in_len); |
| 5660 | const adjusted_count_tmp = if (in_len == 0) buf.len else @minimum(buf.len, in_len); |
| 5661 | // TODO we should not need this cast; improve return type of @minimum |
| 5662 | const adjusted_count = @intCast(usize, adjusted_count_tmp); |
| 5659 | 5663 | const amt_read = try pread(in_fd, buf[0..adjusted_count], in_offset); |
| 5660 | 5664 | if (amt_read == 0) { |
| 5661 | 5665 | if (in_len == 0) { |