Skip to content

Commit 3223204

Browse files
EuGiggitster
authored andcommitted
add: use unsigned type for collection of bits
The 'refresh' function in 'builtin/add.c' declares 'flags' as signed, and passes it as an argument to the 'refresh_index' function, which though expects an unsigned value. Since in this case 'flags' represents a bag of bits, whose MSB is not used in special ways, change the type of 'flags' to unsigned. Signed-off-by: Eugenio Gigante <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d464a4 commit 3223204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/add.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int refresh(int verbose, const struct pathspec *pathspec)
115115
int i, ret = 0;
116116
char *skip_worktree_seen = NULL;
117117
struct string_list only_match_skip_worktree = STRING_LIST_INIT_NODUP;
118-
int flags = REFRESH_IGNORE_SKIP_WORKTREE |
118+
unsigned int flags = REFRESH_IGNORE_SKIP_WORKTREE |
119119
(verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET);
120120

121121
seen = xcalloc(pathspec->nr, 1);

0 commit comments

Comments
 (0)