Merge branch 'master' of /var/lib/git/collectd
[collectd.git] / src / filecount.c
index d15af75..2f10912 100644 (file)
@@ -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);