Skip to content

Commit

Permalink
test-parse-options: use appropriate cast in length_callback
Browse files Browse the repository at this point in the history
OPT_CALLBACK() is passed &integer which is now an "int" rather than
"unsigned long". Update the length_callback function.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Aug 14, 2008
1 parent a96dc01 commit 8caa3ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test-parse-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int length_callback(const struct option *opt, const char *arg, int unset)
if (unset)
return 1; /* do not support unset */

*(unsigned long *)opt->value = strlen(arg);
*(int *)opt->value = strlen(arg);
return 0;
}

Expand Down

0 comments on commit 8caa3ac

Please sign in to comment.