]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - stat.c
stat_line_valid(): use the FOR_EACH_STAT_ITEM macro
[paraslash.git] / stat.c
diff --git a/stat.c b/stat.c
index 4ad1b5a88d957f411c5ccad6bb00f871e440f842..536807dc483f7353566ec1853ba8696598e517e7 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -91,7 +91,7 @@ const char *status_item_list[NUM_STAT_ITEMS] = {
        [SI_CURRENT_TIME] = "current_time",
 
        [SI_AUDIOD_UPTIME] = "audiod_uptime",
-       [SI_DBTOOL] = "dbtool"
+       [SI_SELECTOR] = "dbtool"
 };
 #define FOR_EACH_STAT_ITEM(i) for (i = 0; i < NUM_STAT_ITEMS; i++)
 
@@ -195,7 +195,6 @@ void dump_empty_status(void)
                free(empty_items);
                empty_items = tmp;
        }
-//     PARA_DEBUG_LOG("%s: empty items: %s\n", __func__, empty_items);
        stat_client_write(empty_items);
        free(empty_items);
 }
@@ -217,7 +216,7 @@ int stat_line_valid(const char *line)
        if (!line || !*line)
                return -E_UNKNOWN_STAT_ITEM;
        line_len = strlen(line);
-       for (i = 0; i < NUM_STAT_ITEMS; i++) {
+       FOR_EACH_STAT_ITEM(i) {
                const char *s = status_item_list[i];
                size_t item_len = strlen(s);