Skip to content

Commit

Permalink
checkdiff_consume: strtol parameter fix.
Browse files Browse the repository at this point in the history
The second parameter is not the end of string input; it is
the optional return value to retrieve where the parser stopped.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed May 21, 2006
1 parent 87a56cd commit 9e84816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ static void checkdiff_consume(void *priv, char *line, unsigned long len)
else if (line[0] == '@') {
char *plus = strchr(line, '+');
if (plus)
data->lineno = strtol(plus, line + len, 10);
data->lineno = strtol(plus, NULL, 10);
else
die("invalid diff");
}
Expand Down

0 comments on commit 9e84816

Please sign in to comment.