summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-pack-objects.c2
-rw-r--r--sha1_file.c2
-rw-r--r--usage.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 1c6d2c498b..2000d97ec4 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1293,7 +1293,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
max_size = trg_entry->delta_size;
ref_depth = trg->depth;
}
- max_size = max_size * (max_depth - src->depth) /
+ max_size = (uint64_t)max_size * (max_depth - src->depth) /
(max_depth - ref_depth + 1);
if (max_size == 0)
return 0;
diff --git a/sha1_file.c b/sha1_file.c
index 456317356f..54972f97e0 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2287,7 +2287,7 @@ static void close_sha1_file(int fd)
fsync_or_die(fd, "sha1 file");
fchmod(fd, 0444);
if (close(fd) != 0)
- die("unable to write sha1 file");
+ die("error when closing sha1 file (%s)", strerror(errno));
}
/* Size of directory component, including the ending '/' */
diff --git a/usage.c b/usage.c
index 24f5fc00c2..820d09f92b 100644
--- a/usage.c
+++ b/usage.c
@@ -7,7 +7,7 @@
static void report(const char *prefix, const char *err, va_list params)
{
- char msg[256];
+ char msg[1024];
vsnprintf(msg, sizeof(msg), err, params);
fprintf(stderr, "%s%s\n", prefix, msg);
}