mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
Remove semicolons from ESP_IP4ADDR_INIT and ESP_IP6ADDR_INIT macros
There are structs like esp_netif_dns_info_t that have member for generic ip for which the presence of semicolons is problematic, because when trying to initialize an ip member with one of these macroses it results in a syntax error since semicolon is used within curly braces.
This commit is contained in:
@@ -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) { .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 }}}
|
||||
|
||||
#ifndef IP4ADDR_STRLEN_MAX
|
||||
#define IP4ADDR_STRLEN_MAX 16
|
||||
|
Reference in New Issue
Block a user