From c4aca9ccda51badb672ab70099863072d1567267 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 30 Jul 2008 12:53:45 -0700 Subject: Fix test-parse-options "integer" test OPT_INTEGER() works on an integer, not on an unsigned long. On a big endian architecture with long larger than int, integer test gives bogus results because of this bug. Reported by H.Merijn Brand in HP-UX 64-bit environment. Signed-off-by: Junio C Hamano --- test-parse-options.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test-parse-options.c') diff --git a/test-parse-options.c b/test-parse-options.c index 2a79e729a4..6e18083a7d 100644 --- a/test-parse-options.c +++ b/test-parse-options.c @@ -2,7 +2,8 @@ #include "parse-options.h" static int boolean = 0; -static unsigned long integer = 0; +static int integer = 0; +static unsigned long timestamp; static int abbrev = 7; static int verbose = 0, dry_run = 0, quiet = 0; static char *string = NULL; @@ -32,7 +33,7 @@ int main(int argc, const char **argv) OPT_INTEGER('i', "integer", &integer, "get a integer"), OPT_INTEGER('j', NULL, &integer, "get a integer, too"), OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23), - OPT_DATE('t', NULL, &integer, "get timestamp of