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

Function dist_cli_need_arg

ds4_distributed.c:8078–8090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8076 if (!dist_parse_u32_component(s, (size_t)(colon - s), &parsed.start)) {
8077 if (errlen) snprintf(err, errlen, "invalid start layer in %s", s);
8078 return false;
8079 }
8080
8081 const char *end = colon + 1;
8082 if (!strcmp(end, "output")) {
8083 parsed.end = UINT32_MAX;
8084 parsed.has_output = true;
8085 } else {
8086 if (!dist_parse_u32_component(end, strlen(end), &parsed.end)) {
8087 if (errlen) snprintf(err, errlen, "invalid end layer in %s", s);
8088 return false;
8089 }
8090 if (parsed.end < parsed.start) {
8091 if (errlen) snprintf(err, errlen, "layer range end precedes start in %s", s);
8092 return false;
8093 }

Callers 1

ds4_dist_parse_cli_argFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected