1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

use static_assert to check on fw structure changes over updates (#5939)

This commit is contained in:
david gauchard
2019-04-02 00:44:27 +02:00
committed by GitHub
parent 68c0a1cc9e
commit ca79f2ce39

View File

@ -63,6 +63,9 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
* @return equal
*/
static bool sta_config_equal(const station_config& lhs, const station_config& rhs) {
static_assert(sizeof(station_config) == 112, "struct station_config has changed, please update comparison function");
if(strncmp(reinterpret_cast<const char*>(lhs.ssid), reinterpret_cast<const char*>(rhs.ssid), sizeof(lhs.ssid)) != 0) {
return false;
}