From: Andre Noll Date: Sat, 18 Jul 2009 12:57:15 +0000 (+0200) Subject: audiod: Properly prefix uptime string. X-Git-Tag: v0.3.5~20 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=d40858b7fea7cf170e3b0f75618cd58a61f1cecf;ds=inline audiod: Properly prefix uptime string. The prefix was missing the first time the uptime was printed in the status output. --- diff --git a/audiod_command.c b/audiod_command.c index 5bd511df..48c276e4 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -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);