diff mbox series

[1/2] midx.c: convert FLEX_ALLOC_MEM to FLEX_ALLOC_STR

Message ID 48c968a2923f76ab759327d21b37de86f7a61236.1554328261.git.liu.denton@gmail.com (mailing list archive)
State New, archived
Headers show
Series create FLEX_ALLOC_MEM to FLEX_ALLOC_STR cocci rule | expand

Commit Message

Denton Liu April 3, 2019, 10 p.m. UTC
Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 midx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/midx.c b/midx.c
index 8a505fd423..cb8190329a 100644
--- 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;