summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-16 05:04:53 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-16 05:04:53 +0200
commit82da66fb750c91f06e713ff23a5e5c57ff05c2a8 (patch)
treed36730ca6eaca931106b96a90bced84651ce0bf5 /src/systemctl
parentd8d3d8a781031d6b1ee4e5f57ec21f16c20a4cf2 (diff)
util: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()
DECIMAL_STR_WIDTH() now works on any numeric type, and is easier to distingish from DECIMAL_STR_MAX(). This also replaces another manual implementaiton of ulog10 by this macro.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 36567224f8..2f43052f9a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1178,7 +1178,7 @@ static void list_jobs_print(struct job_info* jobs, size_t n) {
for (i = 0, j = jobs; i < n; i++, j++) {
assert(j->name && j->type && j->state);
- l0 = MAX(l0, decimal_str_max(j->id));
+ l0 = MAX(l0, DECIMAL_STR_WIDTH(j->id));
l1 = MAX(l1, strlen(j->name));
l2 = MAX(l2, strlen(j->type));
l3 = MAX(l3, strlen(j->state));