From: Florian Forster Date: Thu, 11 Aug 2016 05:53:10 +0000 (+0200) Subject: grpc plugin: Rename "err" to "status". X-Git-Tag: collectd-5.6.0~54^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c3ec9f3af65e1ace4e9a9995734599f4501ed854;p=collectd.git grpc plugin: Rename "err" to "status". --- diff --git a/src/grpc.cc b/src/grpc.cc index 53b8fa53..42c6b327 100644 --- a/src/grpc.cc +++ b/src/grpc.cc @@ -264,15 +264,15 @@ class CollectdImpl : public collectd::Collectd::Service { public: grpc::Status QueryValues(grpc::ServerContext *ctx, QueryValuesRequest const *req, grpc::ServerWriter *writer) override { value_list_t match; - auto err = unmarshal_ident(req->identifier(), &match, false); - if (!err.ok()) { - return err; + auto status = unmarshal_ident(req->identifier(), &match, false); + if (!status.ok()) { + return status; } std::queue value_lists; - err = this->queryValuesRead(&match, &value_lists); - if (err.ok()) { - err = this->queryValuesWrite(ctx, writer, &value_lists); + status = this->queryValuesRead(&match, &value_lists); + if (status.ok()) { + status = this->queryValuesWrite(ctx, writer, &value_lists); } while (!value_lists.empty()) { @@ -281,7 +281,7 @@ public: sfree(vl.values); } - return err; + return status; } grpc::Status DispatchValues(grpc::ServerContext *ctx, @@ -356,9 +356,9 @@ private: QueryValuesResponse res; res.Clear(); - auto err = marshal_value_list(&vl, res.mutable_value_list()); - if (!err.ok()) { - return err; + auto status = marshal_value_list(&vl, res.mutable_value_list()); + if (!status.ok()) { + return status; } if (!writer->Write(res)) {