diff options
author | Muxi Yan <mxyan@google.com> | 2017-04-10 18:28:23 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-04-10 18:28:23 -0700 |
commit | 02646c3f62d6e5b07b62ffbdacfb64ae7946b721 (patch) | |
tree | e9aaf3949b0376e4dfc10be17d311ae02031d1c3 /src/core/lib/transport | |
parent | afdad3e8bb40f1f771e24cd6dded81e91603a971 (diff) |
int -> bool
Diffstat (limited to 'src/core/lib/transport')
-rw-r--r-- | src/core/lib/transport/byte_stream.c | 10 | ||||
-rw-r--r-- | src/core/lib/transport/byte_stream.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/lib/transport/byte_stream.c b/src/core/lib/transport/byte_stream.c index 79801c4b46..5800c70ef4 100644 --- a/src/core/lib/transport/byte_stream.c +++ b/src/core/lib/transport/byte_stream.c @@ -58,13 +58,13 @@ void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, /* slice_buffer_stream */ -static int slice_buffer_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, - size_t max_size_hint, - grpc_closure *on_complete) { +static bool slice_buffer_stream_next(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + size_t max_size_hint, + grpc_closure *on_complete) { grpc_slice_buffer_stream *stream = (grpc_slice_buffer_stream *)byte_stream; GPR_ASSERT(stream->cursor < stream->backing_buffer->count); - return 1; + return true; } static grpc_error *slice_buffer_stream_pull(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h index 800e2341f9..381c65fb04 100644 --- a/src/core/lib/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -49,8 +49,8 @@ typedef struct grpc_byte_stream grpc_byte_stream; struct grpc_byte_stream { uint32_t length; uint32_t flags; - int (*next)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, - size_t max_size_hint, grpc_closure *on_complete); + bool (*next)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, + size_t max_size_hint, grpc_closure *on_complete); grpc_error *(*pull)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, grpc_slice *slice); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream); |