Merge branch 'jc/pathspec-match-const'
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 const
This commit is contained in:
commit
d5cd54c966
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -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);
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user