mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 02:07:27 +02:00
Fix compilation errors when using gcc-7.2.0 for the crosstool-ng toolchain
* Change snprintf for strlcat does not complain w/gcc7.2.0 and it is safer, thanks @projectgus * Use proper quotes for character literals Merges https://github.com/espressif/esp-idf/pull/1163 * Original commit: espressif/esp-idf@519edc332d
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
00a72b8920
commit
3aa605fe24
@ -569,7 +569,8 @@ static const uint8_t * _mdns_read_fqdn(const uint8_t * packet, const uint8_t * s
|
||||
&& (strcmp(buf, MDNS_DEFAULT_DOMAIN) != 0)
|
||||
&& (strcmp(buf, "ip6") != 0)
|
||||
&& (strcmp(buf, "in-addr") != 0)) {
|
||||
snprintf((char*)name, MDNS_NAME_BUF_LEN, "%s.%s", name->host, buf);
|
||||
strlcat(name->host, ".", sizeof(name->host));
|
||||
strlcat(name->host, buf, sizeof(name->host));
|
||||
} else if (strcmp(buf, MDNS_SUB_STR) == 0) {
|
||||
name->sub = 1;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user