| 527 | } |
| 528 | |
| 529 | static int parse_mac_addr(const char *str, char *addr) { |
| 530 | if (str != nullptr && addr != nullptr) { |
| 531 | int r = sscanf(str, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx", addr, addr + 1, |
| 532 | addr + 2, addr + 3, addr + 4, addr + 5); |
| 533 | |
| 534 | if (r != 6) { |
| 535 | return -EINVAL; |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | return 0; |
| 540 | } |
| 541 | |
| 542 | /******************************************************************************/ |
| 543 |
no outgoing calls
no test coverage detected