MCPcopy Create free account
hub / github.com/ioi/isolate / opt_uint

Function opt_uint

isolate.c:1332–1344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1330};
1331
1332static unsigned int
1333opt_uint(char *val)
1334{
1335 // This accepts unsigned values which also fit within a signed int
1336 char *end;
1337 errno = 0;
1338 unsigned long int x = strtoul(val, &end, 10);
1339 if (errno || end == val || end && *end)
1340 usage("Invalid numeric parameter: %s\n", val);
1341 if (x > INT_MAX)
1342 usage("Numeric parameter out of range: %s\n", val);
1343 return x;
1344}
1345
1346int
1347main(int argc, char **argv)

Callers 1

mainFunction · 0.85

Calls 1

usageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…