From d40858b7fea7cf170e3b0f75618cd58a61f1cecf Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 18 Jul 2009 14:57:15 +0200 Subject: [PATCH] audiod: Properly prefix uptime string. The prefix was missing the first time the uptime was printed in the status output. --- audiod_command.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.39.2