Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Commit bf8675d

Browse files
spearceJunio C Hamano
authored andcommitted
Use ULONG_MAX rather than implicit cast of -1.
At least one (older) version of the Solaris C compiler won't allow 'unsigned long x = -1' without explicitly casting -1 to a type of unsigned long. So instead use ULONG_MAX, which is really the correct constant anyway. Signed-off-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6f9f3b2 commit bf8675d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static int apply_verbosely;
4343
static int no_add;
4444
static int show_index_info;
4545
static int line_termination = '\n';
46-
static unsigned long p_context = -1;
46+
static unsigned long p_context = ULONG_MAX;
4747
static const char apply_usage[] =
4848
"git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|error|error-all|strip>] <patch>...";
4949

0 commit comments

Comments
 (0)