diff options
Diffstat (limited to 'src/cpp/common')
-rw-r--r-- | src/cpp/common/call.cc | 10 |
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()); } } |