Commit 4b84db6a by Patrick Steinhardt

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 252f2eee (parse:
implement and use `git_parse_advance_digit`, 2017-07-14). As there are
no remaining callers, remove it.
parent 4209a512
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment