summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-23 14:55:46 -0700
committerJunio C Hamano <gitster@pobox.com>2011-03-23 14:55:46 -0700
commit3ed8868474b6309304696a15a1bec184ea235750 (patch)
tree2caf4c5cf21cd3177f9a1feba89b9d054a8dab40 /sha1_file.c
parentda2584243e4308f10adeb45e95fb090c0110fe4f (diff)
parent28bd70d811391be10c55ce4aee1b6ee991d7a86b (diff)
downloadgit-3ed8868474b6309304696a15a1bec184ea235750.tar.gz
Merge branch 'jn/maint-c99-format'
* jn/maint-c99-format: unbreak and eliminate NO_C99_FORMAT mktag: avoid %td in format string
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sha1_file.c b/sha1_file.c
index b4fcca8ffd..7829d615d4 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -26,13 +26,8 @@
#endif
#endif
-#ifdef NO_C99_FORMAT
-#define SZ_FMT "lu"
-static unsigned long sz_fmt(size_t s) { return (unsigned long)s; }
-#else
-#define SZ_FMT "zu"
-static size_t sz_fmt(size_t s) { return s; }
-#endif
+#define SZ_FMT PRIuMAX
+static inline uintmax_t sz_fmt(size_t s) { return s; }
const unsigned char null_sha1[20];