aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-11-20 15:32:51 -0500
committerGravatar ncteisen <ncteisen@gmail.com>2017-11-20 15:32:51 -0500
commit8d1a3ca5fc909899b4895733d496fb563c02dae9 (patch)
tree71eae575406f1f1d7fa5af6d1366362ba1b7c08a /src
parentf852c060384027ae1c82b1ea5d8dae62c9c5ea3c (diff)
use aquire release
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/iomgr/error.cc2
-rw-r--r--src/core/lib/transport/error_utils.cc5
2 files changed, 2 insertions, 5 deletions
diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc
index 581b903f1a..5fe6514802 100644
--- a/src/core/lib/iomgr/error.cc
+++ b/src/core/lib/iomgr/error.cc
@@ -754,7 +754,7 @@ const char* grpc_error_string(grpc_error* err) {
if (!gpr_atm_rel_cas(&err->atomics.error_string, 0, (gpr_atm)out)) {
gpr_free(out);
- out = (char*)gpr_atm_no_barrier_load(&err->atomics.error_string);
+ out = (char*)gpr_atm_acq_load(&err->atomics.error_string);
}
GPR_TIMER_END("grpc_error_string", 0);
diff --git a/src/core/lib/transport/error_utils.cc b/src/core/lib/transport/error_utils.cc
index acac1330b5..69c8ae6de3 100644
--- a/src/core/lib/transport/error_utils.cc
+++ b/src/core/lib/transport/error_utils.cc
@@ -71,10 +71,7 @@ void grpc_error_get_status(grpc_exec_ctx* exec_ctx, grpc_error* error,
if (code != nullptr) *code = status;
if (error_string != NULL && status != GRPC_STATUS_OK) {
- const char* str = grpc_error_string(error);
- if (str != nullptr) {
- *error_string = gpr_strdup(str);
- }
+ *error_string = gpr_strdup(grpc_error_string(error));
}
if (http_error != nullptr) {