[2/2] mtd-utils: serve_image: Use PRIdoff_t as format specifier.

Message ID 1486831412-30409-3-git-send-email-torfl@t-online.de
State Accepted
Delegated to: David Oberhollenzer
Headers show

Commit Message

Grant Likely Feb. 11, 2017, 4:43 p.m.
From: Torsten Fleischer <torfl@t-online.de>

To be independent on the size of off_t the format specifier determined of
common.h should be used instead of PRIu64.

Signed-off-by: Torsten Fleischer <torfl6749@gmail.com>
---
 misc-utils/serve_image.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/misc-utils/serve_image.c b/misc-utils/serve_image.c
index cbcf3b7..26632e3 100644
--- a/misc-utils/serve_image.c
+++ b/misc-utils/serve_image.c
@@ -18,6 +18,8 @@ 
 #include <crc32.h>
 #include <inttypes.h>
 
+#include <common.h>
+
 #include "mcast_image.h"
 
 int tx_rate = 80000;
@@ -126,7 +128,7 @@  int main(int argc, char **argv)
 	}
 
 	if (st.st_size % erasesize) {
-		fprintf(stderr, "Image size %" PRIu64 " bytes is not a multiple of erasesize %d bytes\n",
+		fprintf(stderr, "Image size %" PRIdoff_t " bytes is not a multiple of erasesize %d bytes\n",
 				st.st_size, erasesize);
 		exit(1);
 	}