mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Minor coding style fixes in mdns.c
This commit is contained in:
parent
2137f49d32
commit
f5135b05d9
@ -377,9 +377,8 @@ mdns_readname_loop(struct pbuf *p, u16_t offset, struct mdns_domain *domain, uns
|
||||
if (c + domain->length >= MDNS_DOMAIN_MAXLEN) {
|
||||
return MDNS_READNAME_ERROR;
|
||||
}
|
||||
if (c) {
|
||||
u16_t copied = pbuf_copy_partial(p, label, c, offset);
|
||||
if (copied != c) {
|
||||
if (c != 0) {
|
||||
if (pbuf_copy_partial(p, label, c, offset) != c) {
|
||||
return MDNS_READNAME_ERROR;
|
||||
}
|
||||
offset += c;
|
||||
@ -392,7 +391,7 @@ mdns_readname_loop(struct pbuf *p, u16_t offset, struct mdns_domain *domain, uns
|
||||
/* bad length byte */
|
||||
return MDNS_READNAME_ERROR;
|
||||
}
|
||||
} while (c);
|
||||
} while (c != 0);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user