mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-13 04:38:28 +00:00
Brenton/curly braces (#1971)
* fix formatting * properly adjust various lines breakup multiple statements onto multiple lines * insert {} around if, for, etc.
This commit is contained in:
@ -50,20 +50,27 @@ void OutboundMulticast::init(
|
||||
_frameLen = (len < ZT_MAX_MTU) ? len : ZT_MAX_MTU;
|
||||
_etherType = etherType;
|
||||
|
||||
if (gatherLimit) flags |= 0x02;
|
||||
if (gatherLimit) {
|
||||
flags |= 0x02;
|
||||
}
|
||||
|
||||
_packet.setSource(RR->identity.address());
|
||||
_packet.setVerb(Packet::VERB_MULTICAST_FRAME);
|
||||
_packet.append((uint64_t)nwid);
|
||||
_packet.append(flags);
|
||||
if (gatherLimit) _packet.append((uint32_t)gatherLimit);
|
||||
if (src) src.appendTo(_packet);
|
||||
if (gatherLimit) {
|
||||
_packet.append((uint32_t)gatherLimit);
|
||||
}
|
||||
if (src) {
|
||||
src.appendTo(_packet);
|
||||
}
|
||||
dest.mac().appendTo(_packet);
|
||||
_packet.append((uint32_t)dest.adi());
|
||||
_packet.append((uint16_t)etherType);
|
||||
_packet.append(payload,_frameLen);
|
||||
if (!disableCompression)
|
||||
if (!disableCompression) {
|
||||
_packet.compress();
|
||||
}
|
||||
|
||||
memcpy(_frameData,payload,_frameLen);
|
||||
}
|
||||
|
Reference in New Issue
Block a user