summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-11-14 12:33:38 +0100
committerPatrick Steinhardt <ps@pks.im>2018-11-14 12:35:39 +0100
commit4b84db6a5b73d59102380e65489353f2a7af3c09 (patch)
tree20dbe8aacd25f2636f1029947fb5defbf429a810 /src
parent4209a5125802e714a6342a74ff0835c5c4a2397d (diff)
downloadlibgit2-4b84db6a5b73d59102380e65489353f2a7af3c09.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.
Diffstat (limited to 'src')
-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 f9dcecd1c..0244dbb52 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;