git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] test-parse-options: use appropriate cast in length_callback
@ 2008-08-14  0:48 Brandon Casey
  2008-08-14  1:11 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Brandon Casey @ 2008-08-14  0:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

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>
---
 test-parse-options.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test-parse-options.c b/test-parse-options.c
index 6e18083..61d2c39 100644
--- a/test-parse-options.c
+++ b/test-parse-options.c
@@ -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;
 }
 
-- 
1.6.0.rc2.51.g0dc95

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] test-parse-options: use appropriate cast in length_callback
  2008-08-14  0:48 [PATCH] test-parse-options: use appropriate cast in length_callback Brandon Casey
@ 2008-08-14  1:11 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2008-08-14  1:11 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Git Mailing List

Good eyes.  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-14  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14  0:48 [PATCH] test-parse-options: use appropriate cast in length_callback Brandon Casey
2008-08-14  1:11 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).