MCPcopy Create free account
hub / github.com/git/git / parse_num

Function parse_num

apply.c:1461–1472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1459}
1460
1461static int parse_num(const char *line, unsigned long *p)
1462{
1463 char *ptr;
1464
1465 if (!isdigit(*line))
1466 return 0;
1467 errno = 0;
1468 *p = strtoul(line, &ptr, 10);
1469 if (errno)
1470 return 0;
1471 return ptr - line;
1472}
1473
1474static int parse_range(const char *line, int len, int offset, const char *expect,
1475 unsigned long *p1, unsigned long *p2)

Callers 1

parse_rangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected