Fix some overly long comments. NFC.

This commit is contained in:
whitequark 2018-01-26 17:28:52 +00:00
parent b017a16e98
commit a65daade16
5 changed files with 10 additions and 5 deletions

View File

@ -198,7 +198,8 @@ impl<'a, 'b> RawSocket<'a, 'b> {
if checksum_caps.ipv4.tx() {
packet.fill_checksum();
} else {
// make sure we get a consistently zeroed checksum, since implementations might rely on it
// make sure we get a consistently zeroed checksum,
// since implementations might rely on it
packet.set_checksum(0);
}

View File

@ -482,7 +482,8 @@ impl<'a> Repr<'a> {
if checksum_caps.icmpv4.tx() {
packet.fill_checksum()
} else {
// make sure we get a consistently zeroed checksum, since implementations might rely on it
// make sure we get a consistently zeroed checksum,
// since implementations might rely on it
packet.set_checksum(0);
}
}

View File

@ -524,7 +524,8 @@ impl Repr {
if checksum_caps.ipv4.tx() {
packet.fill_checksum();
} else {
// make sure we get a consistently zeroed checksum, since implementations might rely on it
// make sure we get a consistently zeroed checksum,
// since implementations might rely on it
packet.set_checksum(0);
}
}

View File

@ -751,7 +751,8 @@ impl<'a> Repr<'a> {
if checksum_caps.tcpv4.tx() {
packet.fill_checksum(src_addr, dst_addr)
} else {
// make sure we get a consistently zeroed checksum, since implementations might rely on it
// make sure we get a consistently zeroed checksum,
// since implementations might rely on it
packet.set_checksum(0);
}
}

View File

@ -248,7 +248,8 @@ impl<'a> Repr<'a> {
if checksum_caps.udpv4.tx() {
packet.fill_checksum(src_addr, dst_addr)
} else {
// make sure we get a consistently zeroed checksum, since implementations might rely on it
// make sure we get a consistently zeroed checksum,
// since implementations might rely on it
packet.set_checksum(0);
}
}