mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-05 20:41:44 -07: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:
parent
e6802690b8
commit
f73e51e94c
57 changed files with 2247 additions and 1082 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue