diff options
author | 2016-02-28 21:53:13 -0800 | |
---|---|---|
committer | 2016-02-28 21:53:13 -0800 | |
commit | 3af3f743c32af30adac4fbae780ee63a2af9a489 (patch) | |
tree | 927f94f6b54ff8da4aa04e8a90b5bfa6c2451976 /src/core/iomgr | |
parent | d93aa14fd0c648905d1896306dfe204c48ada0d4 (diff) |
Fixes to things
Diffstat (limited to 'src/core/iomgr')
-rw-r--r-- | src/core/iomgr/exec_ctx.c | 11 | ||||
-rw-r--r-- | src/core/iomgr/exec_ctx.h | 3 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/iomgr/exec_ctx.c b/src/core/iomgr/exec_ctx.c index abcdd2fa0a..893fe4515c 100644 --- a/src/core/iomgr/exec_ctx.c +++ b/src/core/iomgr/exec_ctx.c @@ -105,17 +105,15 @@ static void start_closure(grpc_closure *closure) { gpr_thd_new(&id, run_closure, closure, NULL); } -bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { - return false; -} +bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { return false; } -void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) { -} +void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) {} void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, bool success, grpc_workqueue *offload_target_or_null) { GPR_ASSERT(offload_target_or_null == NULL); + if (closure == NULL) return; closure->final_data = success; start_closure(closure); } @@ -123,7 +121,8 @@ void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, grpc_closure_list *list, grpc_workqueue *offload_target_or_null) { - GPR_ASSERT(offload_target_or_null == NULL); + GPR_ASSERT(offload_target_or_null == NULL); + if (list == NULL) return; grpc_closure *p = list->head; while (p) { grpc_closure *start = p; diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index 3403a978ec..b7388657ed 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -69,7 +69,8 @@ struct grpc_exec_ctx { { GRPC_CLOSURE_LIST_INIT } #else struct grpc_exec_ctx {}; -#define GRPC_EXEC_CTX_INIT {} +#define GRPC_EXEC_CTX_INIT \ + {} #endif /** Flush any work that has been enqueued onto this grpc_exec_ctx. |