summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2020-06-06 21:35:01 +0300
committerHristo Venev <hristo@venev.name>2020-06-06 21:36:15 +0300
commit37f521616512d4f96eb4d40f62b784476d5a5f5d (patch)
tree237e7037e323b1f17c1aef1f2f8fc678d7f4bdea
parent6692d69f8e2c2671135550fc4c633aa2aee147d2 (diff)
Slightly improve string copy loop.
-rw-r--r--vc-log.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vc-log.c b/vc-log.c
index 7764dba..e344500 100644
--- a/vc-log.c
+++ b/vc-log.c
@@ -113,6 +113,7 @@ static char *vc_read_str(size_t off) {
}
size_t alloc2 = alloc + (alloc << 2);
+ alloc2 += (-alloc2) % 16;
char *r2 = realloc(r, alloc2);
if(!r2) abort();
r = r2;