aboutsummaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-15 13:25:50 -0700
committerJunio C Hamano <gitster@pobox.com>2011-04-15 13:27:04 -0700
commited44fd045a8a4bcf7f30a47e4fc6aba761faaf78 (patch)
treeccc8afe7eb85ec89347047f8e3fb5ff7f4c2f6a6 /alloc.c
parente0d48279d5a96bc02edac72c1d28fc38aed37c15 (diff)
parent4d8b32a2e1758236c4c1b714f179892e3bce982c (diff)
downloadgit-ed44fd045a8a4bcf7f30a47e4fc6aba761faaf78.tar.gz
git-ed44fd045a8a4bcf7f30a47e4fc6aba761faaf78.tar.xz
Merge v1.7.5-rc2 into jn/format-patch-doc
This is to sync with the recent updates in Documentation/SubmittingPatches and Documentation/format-patch.txt
Diffstat (limited to 'alloc.c')
-rw-r--r--alloc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/alloc.c b/alloc.c
index 6ef6753d1..aeae55c97 100644
--- a/alloc.c
+++ b/alloc.c
@@ -51,19 +51,12 @@ DEFINE_ALLOCATOR(commit, struct commit)
DEFINE_ALLOCATOR(tag, struct tag)
DEFINE_ALLOCATOR(object, union any_object)
-#ifdef NO_C99_FORMAT
-#define SZ_FMT "%u"
-#else
-#define SZ_FMT "%zu"
-#endif
-
static void report(const char *name, unsigned int count, size_t size)
{
- fprintf(stderr, "%10s: %8u (" SZ_FMT " kB)\n", name, count, size);
+ fprintf(stderr, "%10s: %8u (%"PRIuMAX" kB)\n",
+ name, count, (uintmax_t) size);
}
-#undef SZ_FMT
-
#define REPORT(name) \
report(#name, name##_allocs, name##_allocs*sizeof(struct name) >> 10)