aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/common/call.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/common/call.cc')
-rw-r--r--src/cpp/common/call.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc
index 59630a82da..b2cd55fe24 100644
--- a/src/cpp/common/call.cc
+++ b/src/cpp/common/call.cc
@@ -168,12 +168,10 @@ void CallOpBuffer::FinalizeResult(void **tag, bool *status) {
}
// Parse received status.
if (recv_status_) {
- if (status_details_) {
- *recv_status_ = Status(static_cast<StatusCode>(status_code_),
- grpc::string(status_details_, status_details_capacity_));
- } else {
- *recv_status_ = Status(static_cast<StatusCode>(status_code_));
- }
+ *recv_status_ = Status(
+ static_cast<StatusCode>(status_code_),
+ status_details_ ? grpc::string(status_details_, status_details_capacity_)
+ : grpc::string());
}
}