Skip to content

Commit

Permalink
fix(esp_netif): Fixed initializer order of ESP_IP macros for C++
Browse files Browse the repository at this point in the history
  • Loading branch information
snake-4 authored Aug 21, 2024
1 parent cdee290 commit f371940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/esp_netif/include/esp_netif_ip_addr.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ extern "C" {

#define ESP_IP4TOADDR(a,b,c,d) esp_netif_htonl(ESP_IP4TOUINT32(a, b, c, d))

#define ESP_IP4ADDR_INIT(a, b, c, d) { .type = ESP_IPADDR_TYPE_V4, .u_addr = { .ip4 = { .addr = ESP_IP4TOADDR(a, b, c, d) }}}
#define ESP_IP6ADDR_INIT(a, b, c, d) { .type = ESP_IPADDR_TYPE_V6, .u_addr = { .ip6 = { .addr = { a, b, c, d }, .zone = 0 }}}
#define ESP_IP4ADDR_INIT(a, b, c, d) { .u_addr = { .ip4 = { .addr = ESP_IP4TOADDR(a, b, c, d) }}, .type = ESP_IPADDR_TYPE_V4 }
#define ESP_IP6ADDR_INIT(a, b, c, d) { .u_addr = { .ip6 = { .addr = { a, b, c, d }, .zone = 0 }}, .type = ESP_IPADDR_TYPE_V6 }

#ifndef IP4ADDR_STRLEN_MAX
#define IP4ADDR_STRLEN_MAX 16
Expand Down

0 comments on commit f371940

Please sign in to comment.