MCPcopy Index your code
hub / github.com/git/git / get_unit_factor

Function get_unit_factor

parse.c:5–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "parse.h"
4
5static uintmax_t get_unit_factor(const char *end)
6{
7 if (!*end)
8 return 1;
9 else if (!strcasecmp(end, "k"))
10 return 1024;
11 else if (!strcasecmp(end, "m"))
12 return 1024 * 1024;
13 else if (!strcasecmp(end, "g"))
14 return 1024 * 1024 * 1024;
15 return 0;
16}
17
18int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)
19{

Callers 3

git_parse_signedFunction · 0.85
git_parse_unsignedFunction · 0.85
git_parse_doubleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected