summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common.h4
-rw-r--r--src/odb.c2
2 files changed, 1 insertions, 5 deletions
diff --git a/src/common.h b/src/common.h
index 9a827fad4..798d19706 100644
--- a/src/common.h
+++ b/src/common.h
@@ -14,10 +14,6 @@
#include <unistd.h>
#include <string.h>
-#ifndef PRIuPTR
-# define PRIuPTR "lu"
-#endif
-
#include "cc-compat.h"
#include "git/common.h"
#include "util.h"
diff --git a/src/odb.c b/src/odb.c
index 0e40ca2e7..9d3c39dfd 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -102,7 +102,7 @@ int git_obj__loose_object_type(git_otype type)
static int format_object_header(char *hdr, size_t n, git_obj *obj)
{
const char *type_str = git_obj_type_to_string(obj->type);
- int len = snprintf(hdr, n, "%s %" PRIuPTR, type_str, obj->len);
+ int len = snprintf(hdr, n, "%s %zu", type_str, obj->len);
assert(len > 0); /* otherwise snprintf() is broken */
assert(len < n); /* otherwise the caller is broken! */