MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_val

Function get_val

tools/ifconfig/ifvxlan.c:66–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64};
65
66static int
67get_val(const char *cp, u_long *valp)
68{
69 char *endptr;
70 u_long val;
71
72 errno = 0;
73 val = strtoul(cp, &endptr, 0);
74 if (cp[0] == '\0' || endptr[0] != '\0' || errno == ERANGE)
75 return (-1);
76
77 *valp = val;
78 return (0);
79}
80
81static int
82do_cmd(int sock, u_long op, void *arg, size_t argsize, int set)

Callers 1

ifvxlan.cFile · 0.70

Calls 1

strtoulFunction · 0.85

Tested by

no test coverage detected