summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-08-06 12:00:21 +0200
committerPatrick Steinhardt <ps@pks.im>2018-08-06 12:04:50 +0200
commit0fcd05631a1f59e156e613448262800c155e79d0 (patch)
treebeb6c0d0a18b6918b3d84ecaf0566d92a8375cc5 /src/odb.c
parent64138b70e10b9812af8f944e83747aa51da9a920 (diff)
downloadlibgit2-0fcd05631a1f59e156e613448262800c155e79d0.tar.gz
odb: fix use of wrong printf formatters
The `git_odb_stream` members `declared_size` and `received_bytes` are both of the type `git_off_t`, which we usually defined to be a 64 bit signed integer. Thus, passing these members to "PRIdZ" formatters is not correct, as they are not guaranteed to accept big enough numbers. Instead, use the "PRId64" formatter, which is able to represent 64 bit signed integers.
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/odb.c b/src/odb.c
index 919a9510a..f1c7ebcbd 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1384,8 +1384,8 @@ static int git_odb_stream__invalid_length(
{
giterr_set(GITERR_ODB,
"cannot %s - "
- "Invalid length. %"PRIdZ" was expected. The "
- "total size of the received chunks amounts to %"PRIdZ".",
+ "Invalid length. %"PRId64" was expected. The "
+ "total size of the received chunks amounts to %"PRId64".",
action, stream->declared_size, stream->received_bytes);
return -1;