MCPcopy Create free account
hub / github.com/antirez/ds4 / parse_u64_arg

Function parse_u64_arg

ds4_eval.c:1443–1451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1441 }
1442 return (int)v;
1443}
1444
1445static int parse_nonnegative_int_arg(const char *s, const char *opt) {
1446 char *end = NULL;
1447 long v = strtol(s, &end, 10);
1448 if (s[0] == '\0' || *end != '\0' || v < 0 || v > INT_MAX) {
1449 fprintf(stderr, "ds4-eval: invalid value for %s: %s\n", opt, s);
1450 exit(2);
1451 }
1452 return (int)v;
1453}
1454

Callers 1

parse_optionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected