Merge branch 'jc/pathspec-match-const' into next
Two members in "struct pathspec_item" were of type "char *", but nobody updated the string through these pointers. They have been made "const char *" instead. * jc/pathspec-match-const: pathspec: match and original in pathspec_item are constnext
commit
5a00749668
|
|
@ -749,8 +749,8 @@ void clear_pathspec(struct pathspec *pathspec)
|
|||
int i, j;
|
||||
|
||||
for (i = 0; i < pathspec->nr; i++) {
|
||||
free(pathspec->items[i].match);
|
||||
free(pathspec->items[i].original);
|
||||
free((void *)pathspec->items[i].match);
|
||||
free((void *)pathspec->items[i].original);
|
||||
|
||||
for (j = 0; j < pathspec->items[i].attr_match_nr; j++)
|
||||
free(pathspec->items[i].attr_match[j].value);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ struct pathspec {
|
|||
unsigned magic;
|
||||
int max_depth;
|
||||
struct pathspec_item {
|
||||
char *match;
|
||||
char *original;
|
||||
const char *match;
|
||||
const char *original;
|
||||
unsigned magic;
|
||||
int len, prefix;
|
||||
int nowildcard_len;
|
||||
|
|
|
|||
Loading…
Reference in New Issue