From f41179f16ba2fc16e31be81518536008afe2e278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sun, 27 Jan 2019 07:35:27 +0700 Subject: parse-options: avoid magic return codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Give names to these magic negative numbers. Make parse_opt_ll_cb return an enum to make clear it can actually control parse_options() with different return values (parse_opt_cb can too, but nobody needs it). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/merge.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'builtin/merge.c') diff --git a/builtin/merge.c b/builtin/merge.c index 07839b0bb8..de64d7850e 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -112,8 +112,9 @@ static int option_parse_message(const struct option *opt, return 0; } -static int option_read_message(struct parse_opt_ctx_t *ctx, - const struct option *opt, int unset) +static enum parse_opt_result option_read_message(struct parse_opt_ctx_t *ctx, + const struct option *opt, + int unset) { struct strbuf *buf = opt->value; const char *arg; -- cgit v1.2.3