summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-11-14 12:33:38 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-25 17:43:17 +0000
commitba724069c64e1f8e10da7c4493528f06e39a9e7d (patch)
treee8504759314da912ff8696e811bb06048bf86c85
parent6cb9cd53a910cf1f0021038a88f73912168cdb66 (diff)
downloadlibgit2-ba724069c64e1f8e10da7c4493528f06e39a9e7d.tar.gz
patch_parse: remove unused function `parse_number`
The function `parse_number` was replaced by `git_parse_advance_digit` which is provided by the parser interface in commit 252f2eeee (parse: implement and use `git_parse_advance_digit`, 2017-07-14). As there are no remaining callers, remove it.
-rw-r--r--src/patch_parse.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/patch_parse.c b/src/patch_parse.c
index e02c87cf3..7f6c013b1 100644
--- a/src/patch_parse.c
+++ b/src/patch_parse.c
@@ -458,26 +458,6 @@ done:
return error;
}
-static int parse_number(git_off_t *out, git_patch_parse_ctx *ctx)
-{
- const char *end;
- int64_t num;
-
- if (!git__isdigit(ctx->parse_ctx.line[0]))
- return -1;
-
- if (git__strntol64(&num, ctx->parse_ctx.line, ctx->parse_ctx.line_len, &end, 10) < 0)
- return -1;
-
- if (num < 0)
- return -1;
-
- *out = num;
- git_parse_advance_chars(&ctx->parse_ctx, (end - ctx->parse_ctx.line));
-
- return 0;
-}
-
static int parse_int(int *out, git_patch_parse_ctx *ctx)
{
git_off_t num;