X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ffilecount.c;h=2f10912bff96d9e77d8935e6f16a132e24395030;hb=150924b271e21387ad1929e2373cc6e0772dc351;hp=d15af757cbd9116e15083d821de3ded7cf746b35;hpb=44418e0346a3266d93f07349855766f1c1d30dbc;p=collectd.git diff --git a/src/filecount.c b/src/filecount.c index d15af757..2f10912b 100644 --- a/src/filecount.c +++ b/src/filecount.c @@ -101,9 +101,9 @@ static int fc_config_set_instance (fc_directory_conf_t *dir, const char *str) strncpy (buffer, str, sizeof (buffer)); for (ptr = buffer; *ptr != 0; ptr++) if (*ptr == '/') - *ptr = '-'; + *ptr = '_'; - for (ptr = buffer; *ptr == '-'; ptr++) + for (ptr = buffer; *ptr == '_'; ptr++) /* do nothing */; if (*ptr == 0) @@ -342,10 +342,10 @@ static int fc_config_add_dir (oconfig_item_t *ci) dir->mtime = 0; dir->size = 0; + status = 0; for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; - status = 0; if (strcasecmp ("Instance", option->key) == 0) status = fc_config_add_dir_instance (dir, option);