Merge pull request #15042 from yashykt/gprlikely1

use GPR_UNLIKELY in GPR_ASSERT
pull/15052/head
Yash Tibrewal 7 years ago committed by GitHub
commit 40144692c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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(); \
} \

Loading…
Cancel
Save