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

Function l2fwd_event_parse_timer_period

dpdk/examples/l2fwd-event/main.c:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static int
69l2fwd_event_parse_timer_period(const char *q_arg)
70{
71 char *end = NULL;
72 int n;
73
74 /* parse number string */
75 n = strtol(q_arg, &end, 10);
76 if ((q_arg[0] == '\0') || (end == NULL) || (*end != '\0'))
77 return -1;
78 if (n >= MAX_TIMER_PERIOD)
79 return -1;
80
81 return n;
82}
83
84static void
85l2fwd_event_parse_mode(const char *optarg,

Callers 1

l2fwd_event_parse_argsFunction · 0.85

Calls 1

strtolFunction · 0.85

Tested by

no test coverage detected