erroneous comparison, caught by clang
authorPierre-Yves Ritschard <pyr@spootnik.org>
Thu, 27 Nov 2014 09:08:43 +0000 (10:08 +0100)
committerPierre-Yves Ritschard <pyr@spootnik.org>
Thu, 27 Nov 2014 09:08:43 +0000 (10:08 +0100)
src/write_tsdb.c

index efc7146..b7f46f1 100644 (file)
@@ -367,7 +367,7 @@ static int wt_format_name(char *ret, int ret_len,
         if (vl->plugin_instance[0] == '\0') {
             ssnprintf(ret, ret_len, "%s%s.%s",
                       prefix, vl->plugin, ds_name);
-        } else if (vl->type_instance == '\0') {
+        } else if (vl->type_instance[0] == '\0') {
             ssnprintf(ret, ret_len, "%s%s.%s.%s.%s",
                       prefix, vl->plugin, vl->plugin_instance,
                       vl->type_instance, ds_name);