Skip to content

Commit 8caa3ac

Browse files
drafnelgitster
authored andcommitted
test-parse-options: use appropriate cast in length_callback
OPT_CALLBACK() is passed &integer which is now an "int" rather than "unsigned long". Update the length_callback function. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a96dc01 commit 8caa3ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test-parse-options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ int length_callback(const struct option *opt, const char *arg, int unset)
1515
if (unset)
1616
return 1; /* do not support unset */
1717

18-
*(unsigned long *)opt->value = strlen(arg);
18+
*(int *)opt->value = strlen(arg);
1919
return 0;
2020
}
2121

0 commit comments

Comments
 (0)