]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Little fix
authorBarbara Kaczorowska <bkjg@google.com>
Mon, 21 Sep 2020 10:26:59 +0000 (10:26 +0000)
committerBarbara Kaczorowska <bkjg@google.com>
Mon, 21 Sep 2020 10:26:59 +0000 (10:26 +0000)
src/utils/common/common.c

index cba23fdb5813be1068454c8c868d99bc39b6bd48..010b1fed537c0e44541e99b70042096286524a85 100644 (file)
@@ -884,10 +884,11 @@ int format_name(char *ret, int ret_len, const char *hostname,
   assert(plugin != NULL);
   assert(type != NULL);
 
-  if (hostname != NULL)
+  if (hostname != NULL) {
     APPEND(hostname);
-
-  APPEND("/");
+    APPEND("/");
+  }
+  
   APPEND(plugin);
   if ((plugin_instance != NULL) && (plugin_instance[0] != 0)) {
     APPEND("-");