summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-09 22:57:56 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-09 23:16:53 -0400
commit8c06592fa10c08d94f0841548516e72d08366e85 (patch)
tree5c8f6defc935bdacd79b87f974b5b5d653806b63 /src/systemctl/systemctl.c
parentcab9b000f28a940e92d1d4241d967cad94c650e3 (diff)
systemctl: remove casts in formatting
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index cdaefa52b9..8d6d162d15 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2186,7 +2186,7 @@ static int cancel_job(sd_bus *bus, char **args) {
NULL,
"u", id);
if (r < 0) {
- log_error("Failed to cancel job %u: %s", (unsigned) id, bus_error_message(&error, r));
+ log_error("Failed to cancel job %"PRIu32": %s", id, bus_error_message(&error, r));
return r;
}
}
@@ -3409,7 +3409,7 @@ static void print_status_info(
if (i->main_pid > 0 || i->control_pid > 0) {
if (i->main_pid > 0) {
- printf(" Main PID: %u", (unsigned) i->main_pid);
+ printf(" Main PID: "PID_FMT, i->main_pid);
if (i->running) {
_cleanup_free_ char *comm = NULL;
@@ -3440,7 +3440,7 @@ static void print_status_info(
if (i->control_pid > 0) {
_cleanup_free_ char *c = NULL;
- printf(" %8s: %u", i->main_pid ? "" : " Control", (unsigned) i->control_pid);
+ printf(" %8s: "PID_FMT, i->main_pid ? "" : " Control", i->control_pid);
get_process_comm(i->control_pid, &c);
if (c)
@@ -3828,7 +3828,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
return bus_log_parse_error(r);
if (u > 0)
- printf("%s=%u\n", name, (unsigned) u);
+ printf("%s=%"PRIu32"\n", name, u);
else if (arg_all)
printf("%s=\n", name);
@@ -3999,14 +3999,14 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
tt = strv_join(info.argv, " ");
- printf("%s={ path=%s ; argv[]=%s ; ignore_errors=%s ; start_time=[%s] ; stop_time=[%s] ; pid=%u ; code=%s ; status=%i%s%s }\n",
+ printf("%s={ path=%s ; argv[]=%s ; ignore_errors=%s ; start_time=[%s] ; stop_time=[%s] ; pid="PID_FMT" ; code=%s ; status=%i%s%s }\n",
name,
strna(info.path),
strna(tt),
yes_no(info.ignore),
strna(format_timestamp(timestamp1, sizeof(timestamp1), info.start_timestamp)),
strna(format_timestamp(timestamp2, sizeof(timestamp2), info.exit_timestamp)),
- (unsigned) info. pid,
+ info.pid,
sigchld_code_to_string(info.code),
info.status,
info.code == CLD_EXITED ? "" : "/",