MCPcopy Create free account
hub / github.com/corosync/corosync / str_to_ull

Function str_to_ull

exec/coroparse.c:547–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547static int str_to_ull(const char *str, unsigned long long int *res)
548{
549 unsigned long long int val;
550 char *endptr;
551
552 errno = 0;
553
554 val = strtoull(str, &endptr, 10);
555 if (errno == ERANGE) {
556 return (-1);
557 }
558
559 if (endptr == str) {
560 return (-1);
561 }
562
563 if (*endptr != '\0') {
564 return (-1);
565 }
566
567 *res = val;
568 return (0);
569}
570
571static int get_dscp_value(char *str, int *dscp) {
572 struct dscp_name {const char *name; int dscp;} names[] = {

Callers 1

main_config_parser_cbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected