Merge branch 'dl/flex-str-cocci'
Code clean-up. * dl/flex-str-cocci: cocci: FLEX_ALLOC_MEM to FLEX_ALLOC_STR midx.c: convert FLEX_ALLOC_MEM to FLEX_ALLOC_STR
This commit is contained in:
commit
5f65d7d9bc
13
contrib/coccinelle/flex_alloc.cocci
Normal file
13
contrib/coccinelle/flex_alloc.cocci
Normal file
@ -0,0 +1,13 @@
|
||||
@@
|
||||
expression str;
|
||||
identifier x, flexname;
|
||||
@@
|
||||
- FLEX_ALLOC_MEM(x, flexname, str, strlen(str));
|
||||
+ FLEX_ALLOC_STR(x, flexname, str);
|
||||
|
||||
@@
|
||||
expression str;
|
||||
identifier x, ptrname;
|
||||
@@
|
||||
- FLEXPTR_ALLOC_MEM(x, ptrname, str, strlen(str));
|
||||
+ FLEXPTR_ALLOC_STR(x, ptrname, str);
|
2
midx.c
2
midx.c
@ -71,7 +71,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;
|
||||
|
Loading…
Reference in New Issue
Block a user