Code

test-parse-options: use appropriate cast in length_callback
authorBrandon Casey <casey@nrlssc.navy.mil>
Thu, 14 Aug 2008 00:48:57 +0000 (19:48 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Aug 2008 01:11:44 +0000 (18:11 -0700)
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>
test-parse-options.c

index 6e18083a7d1655e9eabef197c58d92a910d2f67b..61d2c39814529bd0264e4c9e40241131d51d819c 100644 (file)
@@ -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;
 }