[lib] mac_bytes_to_string_r(): use snprintf()
Use snprintf() instead of sprintf() in mac_bytes_to_string_r(). This is really useless, but I want to satisfy the snprintf BSD zealots and get rid of the warning GCC gives me on OpenBSD.
This commit is contained in:
parent
b3cfa2ea08
commit
35e787064b
|
@ -49,7 +49,8 @@ const char* owl_mac_bytes_to_string(const uint8_t *const mac_binary)
|
|||
void owl_mac_bytes_to_string_r(const uint8_t *const mac_binary,
|
||||
char mac_str[OWL_ETHER_ADDR_STRLEN])
|
||||
{
|
||||
sprintf(mac_str, "%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
snprintf(mac_str, OWL_ETHER_ADDR_STRLEN,
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
mac_binary[0], mac_binary[1], mac_binary[2],
|
||||
mac_binary[3], mac_binary[4], mac_binary[5]) ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue