diff options
Diffstat (limited to 'test/core/iomgr/tcp_posix_test.c')
-rw-r--r-- | test/core/iomgr/tcp_posix_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index bba1900987..5eafa570bb 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -274,7 +274,7 @@ struct write_socket_state { }; static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, - size_t *num_blocks, uint8_t *current_data) { + size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1u : 0u); grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; @@ -284,7 +284,7 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left - : slice_size); + : slice_size); num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); buf = GRPC_SLICE_START_PTR(slices[i]); for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { |