[core] Use MAC address size constants instead of literals (#18254)

This commit is contained in:
Jesse Hills
2026-08-11 08:27:32 -04:00
committed by GitHub
parent 2ff55e3058
commit 04dd6b3a55
19 changed files with 34 additions and 32 deletions
+2 -3
View File
@@ -1772,9 +1772,8 @@ bool APIConnection::send_device_info_response_() {
#ifdef USE_AREAS
resp.suggested_area = StringRef(App.get_area());
#endif
// Stack buffer for MAC address (XX:XX:XX:XX:XX:XX\0 = 18 bytes)
char mac_address[18];
uint8_t mac[6];
char mac_address[MAC_ADDRESS_PRETTY_BUFFER_SIZE];
uint8_t mac[MAC_ADDRESS_SIZE];
get_mac_address_raw(mac);
format_mac_addr_upper(mac, mac_address);
resp.mac_address = StringRef(mac_address);