]> granicus.if.org Git - git/commitdiff
midx.c: convert FLEX_ALLOC_MEM to FLEX_ALLOC_STR
authorDenton Liu <liu.denton@gmail.com>
Wed, 3 Apr 2019 22:00:05 +0000 (15:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 Apr 2019 09:22:27 +0000 (18:22 +0900)
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c

diff --git a/midx.c b/midx.c
index 8a505fd423efccf9986079542b47967cc93df7dc..cb8190329a3b9474e904c8c3807fa6912c7ee9f0 100644 (file)
--- a/midx.c
+++ b/midx.c
@@ -70,7 +70,7 @@ struct multi_pack_index *load_multi_pack_index(const char *object_dir, int local
 
        midx_map = xmmap(NULL, midx_size, PROT_READ, MAP_PRIVATE, fd, 0);
 
-       FLEX_ALLOC_MEM(m, object_dir, object_dir, strlen(object_dir));
+       FLEX_ALLOC_STR(m, object_dir, object_dir);
        m->fd = fd;
        m->data = midx_map;
        m->data_len = midx_size;