MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / get_int_option

Function get_int_option

strings/uca-dump.c:612–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610
611
612static int
613get_int_option(const char *str, const char *name, int *num)
614{
615 size_t namelen= strlen(name);
616 if (!strncmp(str, name, namelen))
617 {
618 *num= atoi(str + namelen);
619 if (*num == 0 && str[namelen] !='0')
620 {
621 fprintf(stderr, "\nBad numeric option value: %s\n\n", str);
622 usage(stderr, 1);
623 }
624 return 1;
625 }
626 return 0;
627}
628
629
630static void

Callers 1

process_optionsFunction · 0.70

Calls 2

atoiFunction · 0.85
usageFunction · 0.70

Tested by

no test coverage detected