summaryrefslogtreecommitdiffstats
path: root/src/test/test-log.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-25 13:45:15 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-05-15 15:29:58 +0200
commitde0671ee7fe465e108f62dcbbbe9366f81dd9e9a (patch)
tree3ee30af44852655c365104703359b47a6e6219b5 /src/test/test-log.c
parentMake systemctl --root look for files in the proper places (diff)
downloadsystemd-de0671ee7fe465e108f62dcbbbe9366f81dd9e9a.tar.xz
systemd-de0671ee7fe465e108f62dcbbbe9366f81dd9e9a.zip
Remove unnecessary casts in printfs
No functional change expected :)
Diffstat (limited to 'src/test/test-log.c')
-rw-r--r--src/test/test-log.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/test-log.c b/src/test/test-log.c
index 8dc3d5383f..ca64004b4c 100644
--- a/src/test/test-log.c
+++ b/src/test/test-log.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include "log.h"
+#include "util.h"
int main(int argc, char* argv[]) {
@@ -30,7 +31,7 @@ int main(int argc, char* argv[]) {
log_open();
log_struct(LOG_INFO,
- "MESSAGE=Waldo PID=%lu", (unsigned long) getpid(),
+ "MESSAGE=Waldo PID="PID_FMT, getpid(),
"SERVICE=piepapo",
NULL);
@@ -38,12 +39,12 @@ int main(int argc, char* argv[]) {
log_open();
log_struct(LOG_INFO,
- "MESSAGE=Foobar PID=%lu", (unsigned long) getpid(),
+ "MESSAGE=Foobar PID="PID_FMT, getpid(),
"SERVICE=foobar",
NULL);
log_struct(LOG_INFO,
- "MESSAGE=Foobar PID=%lu", (unsigned long) getpid(),
+ "MESSAGE=Foobar PID="PID_FMT, getpid(),
"FORMAT_STR_TEST=1=%i A=%c 2=%hi 3=%li 4=%lli 1=%p foo=%s 2.5=%g 3.5=%g 4.5=%Lg",
(int) 1, 'A', (short) 2, (long int) 3, (long long int) 4, (void*) 1, "foo", (float) 2.5f, (double) 3.5, (long double) 4.5,
"SUFFIX=GOT IT",