Skip to content

Commit d3d1f8c

Browse files
rscharfepeff
authored andcommitted
parse-options: inline parse_options_usage() at its only remaining caller
Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent ac20ff6 commit d3d1f8c

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

parse-options.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
#include "color.h"
66
#include "utf8.h"
77

8-
static int parse_options_usage(struct parse_opt_ctx_t *ctx,
9-
const char * const *usagestr,
10-
const struct option *opts, int err);
11-
128
#define OPT_SHORT 1
139
#define OPT_UNSET 2
1410

@@ -516,7 +512,7 @@ int parse_options_step(struct parse_opt_ctx_t *ctx,
516512
show_usage_error:
517513
err = 1;
518514
show_usage:
519-
return parse_options_usage(ctx, usagestr, options, err);
515+
return usage_with_options_internal(ctx, usagestr, options, 0, err);
520516
}
521517

522518
int parse_options_end(struct parse_opt_ctx_t *ctx)
@@ -662,13 +658,6 @@ void NORETURN usage_msg_opt(const char *msg,
662658
usage_with_options(usagestr, options);
663659
}
664660

665-
static int parse_options_usage(struct parse_opt_ctx_t *ctx,
666-
const char * const *usagestr,
667-
const struct option *opts, int err)
668-
{
669-
return usage_with_options_internal(ctx, usagestr, opts, 0, err);
670-
}
671-
672661
#undef opterror
673662
int opterror(const struct option *opt, const char *reason, int flags)
674663
{

0 commit comments

Comments
 (0)