]> git.tue.mpg.de Git - paraslash.git/commitdiff
audiod: Properly prefix uptime string.
authorAndre Noll <maan@systemlinux.org>
Sat, 18 Jul 2009 12:57:15 +0000 (14:57 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 18 Jul 2009 12:57:15 +0000 (14:57 +0200)
The prefix was missing the first time the uptime was printed in the status output.

audiod_command.c

index 5bd511df7693a1c6713b2c95917791a1a72d2d39..48c276e4640ee3ffdb3e4b20ff5fe162f9b4296c 100644 (file)
@@ -440,14 +440,14 @@ void audiod_status_dump(void)
                        free(new);
        }
 
-       new = uptime_str();
+       tmp = uptime_str();
+       new = make_message("%s: %s\n", status_item_list[SI_AUDIOD_UPTIME],
+               tmp);
+       free(tmp);
        old = stat_item_values[SI_AUDIOD_UPTIME];
        if (!old || strcmp(old, new)) {
                free(old);
-               tmp = make_message("%s: %s\n",
-                       status_item_list[SI_AUDIOD_UPTIME], new);
-               stat_client_write(tmp, SI_AUDIOD_UPTIME);
-               free(tmp);
+               stat_client_write(new, SI_AUDIOD_UPTIME);
                stat_item_values[SI_AUDIOD_UPTIME] = new;
        } else
                free(new);