diff options
author | Yang Gao <yangg@google.com> | 2015-02-11 11:49:33 -0800 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-02-11 11:49:33 -0800 |
commit | a7c49ab077afc602873ee72ae431211a53e1c88d (patch) | |
tree | 9b41a4a7e6f930bb23323634465aaaeee942fcda /src/cpp | |
parent | a5e2a03fec5fb27f014d3130ede7fe9b6c052e3a (diff) |
minor improvement
Diffstat (limited to 'src/cpp')
-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()); } } |