summaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2011-05-02 23:02:15 -0500
committerLibravatar Jonathan Nieder <jrnieder@gmail.com>2011-05-02 23:02:15 -0500
commit59445b0b02c731872c8665ac7e9cf1226fa616e4 (patch)
tree93922cf13ed9c62859dac628fa7e376977a23d24 /alloc.c
parentRevert "t0081 (line-buffer): add buffering tests" (diff)
parentGit 1.7.5 (diff)
downloadtgif-59445b0b02c731872c8665ac7e9cf1226fa616e4.tar.xz
Merge commit 'v1.7.5' into svn-fe
* commit 'v1.7.5': (436 commits) Git 1.7.5 Git 1.7.5-rc3 Git 1.7.4.5 git-svn.txt: Document --mergeinfo Revert "run-command: prettify -D_FORTIFY_SOURCE workaround" ...
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 6ef6753d18..aeae55c976 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)