| 341 | } |
| 342 | |
| 343 | static int |
| 344 | lsi_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 */ |
| 360 | static int |
no test coverage detected