mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
CLI: Cosmetic issue - core show uptime
Show uptime information ends with an unnecessary space. Now NEEDCOMMA is better defined. Change-Id: I11b360504a0703309ff51772ff8f672287f3c5a1
This commit is contained in:
@@ -837,8 +837,10 @@ static void print_uptimestr(int fd, struct timeval timeval, const char *prefix,
|
|||||||
ast_str_append(&out, 0, "%d minute%s%s", x, ESS(x), NEEDCOMMA(timeval.tv_sec));
|
ast_str_append(&out, 0, "%d minute%s%s", x, ESS(x), NEEDCOMMA(timeval.tv_sec));
|
||||||
}
|
}
|
||||||
x = timeval.tv_sec;
|
x = timeval.tv_sec;
|
||||||
if (x > 0 || ast_str_strlen(out) == 0) /* if there is nothing, print 0 seconds */
|
if (x > 0 || ast_str_strlen(out) == 0) {
|
||||||
|
/* if there is nothing, print 0 seconds */
|
||||||
ast_str_append(&out, 0, "%d second%s", x, ESS(x));
|
ast_str_append(&out, 0, "%d second%s", x, ESS(x));
|
||||||
|
}
|
||||||
ast_cli(fd, "%s: %s\n", prefix, ast_str_buffer(out));
|
ast_cli(fd, "%s: %s\n", prefix, ast_str_buffer(out));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user