* Convert the node id number from a string to an int. */
| 69 | * Convert the node id number from a string to an int. |
| 70 | */ |
| 71 | static int |
| 72 | parse_node_num(const char *node) |
| 73 | { |
| 74 | char *end = NULL; |
| 75 | unsigned long temp; |
| 76 | |
| 77 | if (node == NULL || *node == '\0') |
| 78 | return -1; |
| 79 | |
| 80 | temp = strtoul(node, &end, 10); |
| 81 | if (end == NULL || *end != '\0') |
| 82 | return -1; |
| 83 | |
| 84 | node_id = (uint8_t)temp; |
| 85 | return 0; |
| 86 | } |
| 87 | |
| 88 | /* |
| 89 | * Parse the application arguments to the node app. |
no test coverage detected