| 66 | } |
| 67 | |
| 68 | static int |
| 69 | l2fwd_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 | |
| 84 | static void |
| 85 | l2fwd_event_parse_mode(const char *optarg, |
no test coverage detected