summaryrefslogtreecommitdiff
path: root/src/core/job.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-30 17:22:26 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-02 19:45:47 -0500
commitccd06097c79218f7d5ea4c21721bbcbc7c467dca (patch)
tree168bee7d15161c2c1cba3926447162b84c761898 /src/core/job.c
parentab9001a1e3dc6e60d0cdf53363dc5d18dcc382fd (diff)
Use format patterns for usec_t, pid_t, nsec_t, usec_t
It is nicer to predefine patterns using configure time check instead of using casts everywhere. Since we do not need to use any flags, include "%" in the format instead of excluding it like PRI* macros.
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/job.c b/src/core/job.c
index 491c73d47b..7faa8da0ed 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -906,7 +906,7 @@ char *job_dbus_path(Job *j) {
assert(j);
- if (asprintf(&p, "/org/freedesktop/systemd1/job/%lu", (unsigned long) j->id) < 0)
+ if (asprintf(&p, "/org/freedesktop/systemd1/job/%"PRIu32, j->id) < 0)
return NULL;
return p;
@@ -922,7 +922,7 @@ int job_serialize(Job *j, FILE *f, FDSet *fds) {
fprintf(f, "job-ignore-order=%s\n", yes_no(j->ignore_order));
if (j->begin_usec > 0)
- fprintf(f, "job-begin=%llu\n", (unsigned long long) j->begin_usec);
+ fprintf(f, "job-begin="USEC_FMT"\n", j->begin_usec);
bus_client_track_serialize(j->manager, f, j->subscribed);