summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-02 11:36:51 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-02 11:38:34 +0100
commite7b35c435f44018351cb972904039665783be410 (patch)
tree5804aac9ecab970a8be6b80474fc8c982cdf15ec /src/util.c
parent0f388374b3a7f2b987f83924cf4a3c80ff4761f1 (diff)
downloadadvtime-e7b35c435f44018351cb972904039665783be410.tar.gz
advtime-e7b35c435f44018351cb972904039665783be410.tar.bz2
advtime-e7b35c435f44018351cb972904039665783be410.zip
Use PRId64 for int64_t in printfs
Using %lld is not portable, since it depends on the architecture whether to use %ld or %lld. The inttypes.h header thus defines macros that propose the correct one.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 3f7702f..ff00370 100644
--- a/src/util.c
+++ b/src/util.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <inttypes.h>
#include "video_decode.h"
#include "util.h"
@@ -134,7 +135,7 @@ print_time(int64_t msec) {
int ss = msec / 1000;
msec -= ss * 1000;
- printf("%02d:%02d:%02d.%03lld", hh, mm, ss, msec);
+ printf("%02d:%02d:%02d.%03" PRId64, hh, mm, ss, msec);
}
int