Skip to content

Commit 9e84816

Browse files
author
Junio C Hamano
committed
checkdiff_consume: strtol parameter fix.
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>
1 parent 87a56cd commit 9e84816

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static void checkdiff_consume(void *priv, char *line, unsigned long len)
431431
else if (line[0] == '@') {
432432
char *plus = strchr(line, '+');
433433
if (plus)
434-
data->lineno = strtol(plus, line + len, 10);
434+
data->lineno = strtol(plus, NULL, 10);
435435
else
436436
die("invalid diff");
437437
}

0 commit comments

Comments
 (0)