* Take the number of nodes parameter passed to the app * and convert to a number to store in the num_nodes variable */
| 81 | * and convert to a number to store in the num_nodes variable |
| 82 | */ |
| 83 | static int |
| 84 | parse_num_nodes(const char *nodes) |
| 85 | { |
| 86 | char *end = NULL; |
| 87 | unsigned long temp; |
| 88 | |
| 89 | if (nodes == NULL || *nodes == '\0') |
| 90 | return -1; |
| 91 | |
| 92 | temp = strtoul(nodes, &end, 10); |
| 93 | if (end == NULL || *end != '\0' || temp == 0) |
| 94 | return -1; |
| 95 | |
| 96 | num_nodes = (uint8_t)temp; |
| 97 | return 0; |
| 98 | } |
| 99 | |
| 100 | static int |
| 101 | parse_num_flows(const char *flows) |
no test coverage detected