aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Alexander Polcyn <apolcyn@google.com>2016-07-13 12:57:41 -0700
committerGravatar Alexander Polcyn <apolcyn@google.com>2016-07-13 12:58:57 -0700
commit78aa4580fd02c2a8f1982aa7cf924a2fc5ff6924 (patch)
tree7c3401dae3e20f4b2399a01fcc9da7db72339db0
parent377427a7bd0b5bbf9270357737ab8b42e94e1f1b (diff)
Add csharp check to return val of byte_buffer_reader_init
-rw-r--r--src/csharp/ext/grpc_csharp_ext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c
index c670ea65c7..3d0947c03d 100644
--- a/src/csharp/ext/grpc_csharp_ext.c
+++ b/src/csharp/ext/grpc_csharp_ext.c
@@ -253,8 +253,9 @@ GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length(
if (!ctx->recv_message) {
return -1;
}
- /* TODO(issue:#7206): check return value of grpc_byte_buffer_reader_init. */
- grpc_byte_buffer_reader_init(&reader, ctx->recv_message);
+
+ GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message));
+
return (intptr_t)grpc_byte_buffer_length(reader.buffer_out);
}
@@ -268,8 +269,7 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer(
gpr_slice slice;
size_t offset = 0;
- /* TODO(issue:#7206): check return value of grpc_byte_buffer_reader_init. */
- grpc_byte_buffer_reader_init(&reader, ctx->recv_message);
+ GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message));
while (grpc_byte_buffer_reader_next(&reader, &slice)) {
size_t len = GPR_SLICE_LENGTH(slice);