diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-04-12 12:37:29 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-04-12 12:37:48 -0700 |
commit | 794edb3207d4a0e0593c4eeb395efcb4893d3ca0 (patch) | |
tree | 97eccb8e38ca692433995ca9c1e7b988a265ef8d /include/grpc/support | |
parent | 344a2b2559a10b5e04fa44d8a1f1d92cc8b36278 (diff) |
use GPR_UNLIKELY in GPR_ASSERT
Diffstat (limited to 'include/grpc/support')
-rw-r--r-- | include/grpc/support/log.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h index 7521453b80..b6fbbde23c 100644 --- a/include/grpc/support/log.h +++ b/include/grpc/support/log.h @@ -93,7 +93,7 @@ GPRAPI void gpr_set_log_function(gpr_log_func func); an exception in a higher-level language, consider returning error code. */ #define GPR_ASSERT(x) \ do { \ - if (!(x)) { \ + if (GPR_UNLIKELY(!(x))) { \ gpr_log(GPR_ERROR, "assertion failed: %s", #x); \ abort(); \ } \ |