diff mbox series

[rt-tests,v1,02/13] cyclicdeadline.c: Fix printf format specifier

Message ID 20210304192220.11272-3-dwagner@suse.de
State New
Headers show
Series JSON cleanups and more tests updated | expand

Commit Message

Daniel Wagner March 4, 2021, 7:22 p.m. UTC
The fields are not uint64 just longs, update the printf format
specifiers.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/sched_deadline/cyclicdeadline.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index 33bac8cda898..d7aa9bb5d269 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -18,7 +18,6 @@ 
 #include <errno.h>
 #include <signal.h>
 #include <getopt.h>
-#include <inttypes.h>
 
 #include <sys/syscall.h>
 #include <sys/types.h>
@@ -976,9 +975,9 @@  static void write_stats(FILE *f, void *data)
 	for (i = 0; i < nr_threads; i++) {
 		s = &sd[i].stat;
 		fprintf(f, "    \"%u\": {\n", i);
-		fprintf(f, "	 \"cycles\": %" PRIu64 ",\n", s->cycles);
-		fprintf(f, "	 \"min\": %" PRIu64 ",\n", s->min);
-		fprintf(f, "	 \"max\": %" PRIu64 ",\n", s->max);
+		fprintf(f, "	 \"cycles\": %ld,\n", s->cycles);
+		fprintf(f, "	 \"min\": %ld,\n", s->min);
+		fprintf(f, "	 \"max\": %ld\n", s->max);
 		fprintf(f, "	 \"avg\": %.2f\n", s->avg/s->cycles);
 		fprintf(f, "    }%s\n", i == nr_threads - 1 ? "" : ",");
 	}