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

Function lsi_parse_timer_period

dpdk/examples/link_status_interrupt/main.c:343–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343static int
344lsi_parse_timer_period(const char *q_arg)
345{
346 char *end = NULL;
347 int n;
348
349 /* parse number string */
350 n = strtol(q_arg, &end, 10);
351 if ((q_arg[0] == '\0') || (end == NULL) || (*end != '\0'))
352 return -1;
353 if (n >= MAX_TIMER_PERIOD)
354 return -1;
355
356 return n;
357}
358
359/* Parse the argument given in the command line of the application */
360static int

Callers 1

lsi_parse_argsFunction · 0.85

Calls 1

strtolFunction · 0.85

Tested by

no test coverage detected