mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 13:14:32 +02:00
Merge branch 'feature/fix_warning_in_mac_addr' into 'master'
esp_hw_support: Fix coverity warnings in mac_addr API See merge request espressif/esp-idf!21141
This commit is contained in:
@@ -74,8 +74,11 @@ static int get_idx(esp_mac_type_t type)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static esp_err_t get_mac_addr_from_mac_table(uint8_t *mac, unsigned idx, bool silent)
|
static esp_err_t get_mac_addr_from_mac_table(uint8_t *mac, int idx, bool silent)
|
||||||
{
|
{
|
||||||
|
if (idx == -1) {
|
||||||
|
return ESP_ERR_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
if (!(s_mac_table[idx].state & STATE_SET)) {
|
if (!(s_mac_table[idx].state & STATE_SET)) {
|
||||||
esp_mac_type_t type = s_mac_table[idx].type;
|
esp_mac_type_t type = s_mac_table[idx].type;
|
||||||
if (type == ESP_MAC_BASE || type == ESP_MAC_EFUSE_FACTORY || type == ESP_MAC_EFUSE_CUSTOM) {
|
if (type == ESP_MAC_BASE || type == ESP_MAC_EFUSE_FACTORY || type == ESP_MAC_EFUSE_CUSTOM) {
|
||||||
|
Reference in New Issue
Block a user