Thread (3 messages) flat view 3 messages, 2 authors, 2016-08-11
STALE3663d

[PATCH 1/2] Use ULONG_MAX rather than implicit cast of -1.

From: Shawn O. Pearce <hidden>
Date: 2016-08-11 19:42:24
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 This is a resend of my earlier patch in in this same thread...

 builtin-apply.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-apply.c b/builtin-apply.c
index db7cdce..aad5526 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -43,7 +43,7 @@ static int apply_verbosely;
 static int no_add;
 static int show_index_info;
 static int line_termination = '\n';
-static unsigned long p_context = -1;
+static unsigned long p_context = ULONG_MAX;
 static const char apply_usage[] =
 "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>...";
 
-- 
1.4.3.3.g9621
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help