Merge branch 'collectd-5.8'
[collectd.git] / src / write_sensu.c
index bda3327..6ea8106 100644 (file)
@@ -309,8 +309,8 @@ static int sensu_format_name2(char *ret, int ret_len, const char *hostname,
 
 static void in_place_replace_sensu_name_reserved(char *orig_name) /* {{{ */
 {
-  int len = strlen(orig_name);
-  for (int i = 0; i < len; i++) {
+  size_t len = strlen(orig_name);
+  for (size_t i = 0; i < len; i++) {
     // some plugins like ipmi generate special characters in metric name
     switch (orig_name[i]) {
     case '(':
@@ -1084,12 +1084,8 @@ static int sensu_config_node(oconfig_item_t *ci) /* {{{ */
         break;
     } else if (strcasecmp("Port", child->key) == 0) {
       status = cf_util_get_service(child, &host->service);
-      if (status != 0) {
-        ERROR("write_sensu plugin: Invalid argument "
-              "configured for the \"Port\" "
-              "option.");
+      if (status != 0)
         break;
-      }
     } else if (strcasecmp("StoreRates", child->key) == 0) {
       status = cf_util_get_boolean(child, &host->store_rates);
       if (status != 0)