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

Function default_backend

ds4_cli.c:182–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 if (s[0] == '\0' || *end != '\0' || v <= 0 || v > INT32_MAX) {
181 fprintf(stderr, "ds4: invalid value for %s: %s\n", opt, s);
182 exit(2);
183 }
184 return (int)v;
185}
186
187static int parse_nonnegative_int(const char *s, const char *opt) {
188 char *end = NULL;
189 long v = strtol(s, &end, 10);
190 if (s[0] == '\0' || *end != '\0' || v < 0 || v > INT32_MAX) {
191 fprintf(stderr, "ds4: invalid value for %s: %s\n", opt, s);
192 exit(2);
193 }

Callers 1

parse_optionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected