X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=alloc.c;h=aeae55c976802264d714282218e58a858a9c68b5;hb=fae9d761c78cba1039854b51df6c2f7360e59cba;hp=6ef6753d180afad29bc335854150c824b9de8a18;hpb=77f143bf3e218857ec8e5244d7e862e8e0c1a041;p=git.git 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)