dir: store EXC_FLAG_* values in unsigned integers

The values defined by the macro EXC_FLAG_* (1, 4, 8, 16) are stored
in fields of the structs "pattern" and "exclude", some functions
arguments and a local variable.  None of these uses its most
significant bit in any special way and there is no good reason to
use a signed integer for them.

And while we're at it, document "flags" of "exclude" to explicitly
state the values it's supposed to take on.

Signed-off-by: Saurav Sachidanand <sauravsachidanand@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Saurav Sachidanand
2016-03-01 22:32:59 +05:30
committed by Junio C Hamano
parent a2558fb8e1
commit f870899864
3 changed files with 9 additions and 9 deletions

2
attr.c
View File

@ -124,7 +124,7 @@ struct pattern {
const char *pattern;
int patternlen;
int nowildcardlen;
int flags; /* EXC_FLAG_* */
unsigned flags; /* EXC_FLAG_* */
};
/*