* [PATCH] help: Add a missing OPT_END().
@ 2008-04-02 3:47 Christian Couder
2008-04-02 3:44 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Christian Couder @ 2008-04-02 3:47 UTC (permalink / raw)
To: Junio Hamano, Jeff King, Pierre Habouzit; +Cc: git
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
help.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Some comments in "parse-options.h" say it is needed,
though I did not see a crash without it.
diff --git a/help.c b/help.c
index ecaca77..10298fb 100644
--- a/help.c
+++ b/help.c
@@ -30,6 +30,7 @@ static struct option builtin_help_options[] = {
HELP_FORMAT_WEB),
OPT_SET_INT('i', "info", &help_format, "show info page",
HELP_FORMAT_INFO),
+ OPT_END(),
};
static const char * const builtin_help_usage[] = {
--
1.5.5.rc2.6.gf58d
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] help: Add a missing OPT_END().
2008-04-02 3:47 [PATCH] help: Add a missing OPT_END() Christian Couder
@ 2008-04-02 3:44 ` Jeff King
2008-04-02 4:34 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2008-04-02 3:44 UTC (permalink / raw)
To: Christian Couder; +Cc: Junio Hamano, Pierre Habouzit, git
On Wed, Apr 02, 2008 at 05:47:41AM +0200, Christian Couder wrote:
> Some comments in "parse-options.h" say it is needed,
> though I did not see a crash without it.
There was no particular reason I didn't put it in; I just didn't know
about it. So ack from me, assuming it is supposed to be there.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] help: Add a missing OPT_END().
2008-04-02 3:44 ` Jeff King
@ 2008-04-02 4:34 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2008-04-02 4:34 UTC (permalink / raw)
To: Jeff King; +Cc: Christian Couder, Pierre Habouzit, git
Jeff King <peff@peff.net> writes:
> On Wed, Apr 02, 2008 at 05:47:41AM +0200, Christian Couder wrote:
>
>> Some comments in "parse-options.h" say it is needed,
>> though I did not see a crash without it.
>
> There was no particular reason I didn't put it in; I just didn't know
> about it. So ack from me, assuming it is supposed to be there.
parse-options.c::parse_short_opt() and parse_long_opt() has this loop:
for (; options->type != OPTION_END; options++) {
...
}
So whatever happens to come after builtin_help_options[] may be read from
by this loop when you do not have OPTION_END.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-02 4:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-02 3:47 [PATCH] help: Add a missing OPT_END() Christian Couder
2008-04-02 3:44 ` Jeff King
2008-04-02 4:34 ` 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).