CLI: Cosmetic issue - core show uptime

Show uptime information ends with an unnecessary space.

Now NEEDCOMMA is better defined.

Change-Id: I11b360504a0703309ff51772ff8f672287f3c5a1
changes/94/594/1
ibercom 10 years ago
parent 86c79314f1
commit d463bac574

@ -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));
}
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_cli(fd, "%s: %s\n", prefix, ast_str_buffer(out));
}

Loading…
Cancel
Save