Skip to content

Commit 4b84db6

Browse files
committed
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 252f2ee (parse: implement and use `git_parse_advance_digit`, 2017-07-14). As there are no remaining callers, remove it.
1 parent 4209a51 commit 4b84db6

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/patch_parse.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -458,26 +458,6 @@ static int parse_header_git(
458458
return error;
459459
}
460460

461-
static int parse_number(git_off_t *out, git_patch_parse_ctx *ctx)
462-
{
463-
const char *end;
464-
int64_t num;
465-
466-
if (!git__isdigit(ctx->parse_ctx.line[0]))
467-
return -1;
468-
469-
if (git__strntol64(&num, ctx->parse_ctx.line, ctx->parse_ctx.line_len, &end, 10) < 0)
470-
return -1;
471-
472-
if (num < 0)
473-
return -1;
474-
475-
*out = num;
476-
git_parse_advance_chars(&ctx->parse_ctx, (end - ctx->parse_ctx.line));
477-
478-
return 0;
479-
}
480-
481461
static int parse_int(int *out, git_patch_parse_ctx *ctx)
482462
{
483463
git_off_t num;

0 commit comments

Comments
 (0)