X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fgrpc.cc;h=0330aa0d5225c02e7e8852e3c3415e653ac51636;hp=a1abe4a292d97cb8256afe475456d046b14c2167;hb=f8b9ad9fccdc8fd779fd1be433220bf6bcd59961;hpb=704a0fed3a3dd9ea009168ca44818739b34f907e diff --git a/src/grpc.cc b/src/grpc.cc index a1abe4a2..0330aa0d 100644 --- a/src/grpc.cc +++ b/src/grpc.cc @@ -88,12 +88,10 @@ static grpc::Status unmarshal_value_list(const collectd::types::ValueList &msg, sstrncpy(vl->type, s.c_str(), sizeof(vl->type)); s = msg.plugin_instance(); - if (s.length()) - sstrncpy(vl->plugin_instance, s.c_str(), sizeof(vl->plugin_instance)); + sstrncpy(vl->plugin_instance, s.c_str(), sizeof(vl->plugin_instance)); s = msg.type_instance(); - if (s.length()) - sstrncpy(vl->type_instance, s.c_str(), sizeof(vl->type_instance)); + sstrncpy(vl->type_instance, s.c_str(), sizeof(vl->type_instance)); value_t *values = NULL; size_t values_len = 0; @@ -126,7 +124,7 @@ static grpc::Status unmarshal_value_list(const collectd::types::ValueList &msg, break; default: status = grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, - grpc::string("unkown value type")); + grpc::string("unknown value type")); break; }