diff --git a/main/cdr.c b/main/cdr.c index ce525e20b8..3e85b05fa6 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -984,10 +984,10 @@ static int handle_cli_status(int fd, int argc, char *argv[]) nextbatchtime = ast_sched_when(sched, cdr_sched); ast_cli(fd, "CDR safe shut down: %s\n", batchsafeshutdown ? "enabled" : "disabled"); ast_cli(fd, "CDR batch threading model: %s\n", batchscheduleronly ? "scheduler only" : "scheduler plus separate threads"); - ast_cli(fd, "CDR current batch size: %d record%s\n", cnt, (cnt != 1) ? "s" : ""); - ast_cli(fd, "CDR maximum batch size: %d record%s\n", batchsize, (batchsize != 1) ? "s" : ""); - ast_cli(fd, "CDR maximum batch time: %d second%s\n", batchtime, (batchtime != 1) ? "s" : ""); - ast_cli(fd, "CDR next scheduled batch processing time: %ld second%s\n", nextbatchtime, (nextbatchtime != 1) ? "s" : ""); + ast_cli(fd, "CDR current batch size: %d record%s\n", cnt, ESS(cnt)); + ast_cli(fd, "CDR maximum batch size: %d record%s\n", batchsize, ESS(batchsize)); + ast_cli(fd, "CDR maximum batch time: %d second%s\n", batchtime, ESS(batchtime)); + ast_cli(fd, "CDR next scheduled batch processing time: %ld second%s\n", nextbatchtime, ESS(nextbatchtime)); } AST_LIST_LOCK(&be_list); AST_LIST_TRAVERSE(&be_list, beitem, list) { diff --git a/res/res_features.c b/res/res_features.c index b1d50e59b5..485dcbc19f 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1917,7 +1917,7 @@ static int handle_parkedcalls(int fd, int argc, char *argv[]) numparked++; } ast_mutex_unlock(&parking_lock); - ast_cli(fd, "%d parked call%s.\n", numparked, (numparked != 1) ? "s" : ""); + ast_cli(fd, "%d parked call%s.\n", numparked, ESS(numparked)); return RESULT_SUCCESS; diff --git a/res/res_realtime.c b/res/res_realtime.c index 8f382fefde..ee10735763 100644 --- a/res/res_realtime.c +++ b/res/res_realtime.c @@ -88,7 +88,7 @@ static int cli_realtime_update(int fd, int argc, char **argv) { return RESULT_SUCCESS; } - ast_cli(fd, "Updated %d RealTime record%s.\n", res, (res != 1) ? "s" : ""); + ast_cli(fd, "Updated %d RealTime record%s.\n", res, ESS(res)); return RESULT_SUCCESS; }