From: Pierre-Yves Ritschard Date: Thu, 27 Nov 2014 09:08:43 +0000 (+0100) Subject: erroneous comparison, caught by clang X-Git-Tag: collectd-5.5.0~123 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=55879a480209d16f15a03be54f68e231d16cf9b6;p=collectd.git erroneous comparison, caught by clang --- diff --git a/src/write_tsdb.c b/src/write_tsdb.c index efc71467..b7f46f1b 100644 --- a/src/write_tsdb.c +++ b/src/write_tsdb.c @@ -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);