You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
net/core: remove duplicate statements by do-while loop
Remove duplicate statements by using do-while loop instead of while loop.
- A;
- while (e) {
+ do {
A;
- }
+ } while (e);
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
33d7c5e539
commit
70e3ba72ba
+6
-9
@@ -2396,18 +2396,15 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
|
||||
__be32 s;
|
||||
if (pkt_dev->flags & F_IPDST_RND) {
|
||||
|
||||
t = prandom_u32() % (imx - imn) + imn;
|
||||
s = htonl(t);
|
||||
|
||||
while (ipv4_is_loopback(s) ||
|
||||
ipv4_is_multicast(s) ||
|
||||
ipv4_is_lbcast(s) ||
|
||||
ipv4_is_zeronet(s) ||
|
||||
ipv4_is_local_multicast(s)) {
|
||||
do {
|
||||
t = prandom_u32() %
|
||||
(imx - imn) + imn;
|
||||
s = htonl(t);
|
||||
}
|
||||
} while (ipv4_is_loopback(s) ||
|
||||
ipv4_is_multicast(s) ||
|
||||
ipv4_is_lbcast(s) ||
|
||||
ipv4_is_zeronet(s) ||
|
||||
ipv4_is_local_multicast(s));
|
||||
pkt_dev->cur_daddr = s;
|
||||
} else {
|
||||
t = ntohl(pkt_dev->cur_daddr);
|
||||
|
||||
Reference in New Issue
Block a user