Skip to content

Commit a038208

Browse files
pseidererNipaLocal
authored andcommitted
net: pktgen: fix code style (WARNING: braces {} are not necessary for single statement blocks)
Fix checkpatch code style warnings: WARNING: braces {} are not necessary for single statement blocks #2538: FILE: net/core/pktgen.c:2538: + if ((pkt_dev->flags & F_VID_RND) && (pkt_dev->vlan_id != 0xffff)) { + pkt_dev->vlan_id = get_random_u32_below(4096); + } WARNING: braces {} are not necessary for single statement blocks #2542: FILE: net/core/pktgen.c:2542: + if ((pkt_dev->flags & F_SVID_RND) && (pkt_dev->svlan_id != 0xffff)) { + pkt_dev->svlan_id = get_random_u32_below(4096); + } WARNING: braces {} are not necessary for single statement blocks #2611: FILE: net/core/pktgen.c:2611: + if (t > imx) { + t = imn; + } Signed-off-by: Peter Seiderer <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent fe93d63 commit a038208

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

net/core/pktgen.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,13 +2535,11 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
25352535
htonl(0x000fffff));
25362536
}
25372537

2538-
if ((pkt_dev->flags & F_VID_RND) && (pkt_dev->vlan_id != 0xffff)) {
2538+
if ((pkt_dev->flags & F_VID_RND) && (pkt_dev->vlan_id != 0xffff))
25392539
pkt_dev->vlan_id = get_random_u32_below(4096);
2540-
}
25412540

2542-
if ((pkt_dev->flags & F_SVID_RND) && (pkt_dev->svlan_id != 0xffff)) {
2541+
if ((pkt_dev->flags & F_SVID_RND) && (pkt_dev->svlan_id != 0xffff))
25432542
pkt_dev->svlan_id = get_random_u32_below(4096);
2544-
}
25452543

25462544
if (pkt_dev->udp_src_min < pkt_dev->udp_src_max) {
25472545
if (pkt_dev->flags & F_UDPSRC_RND)
@@ -2608,9 +2606,8 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
26082606
} else {
26092607
t = ntohl(pkt_dev->cur_daddr);
26102608
t++;
2611-
if (t > imx) {
2609+
if (t > imx)
26122610
t = imn;
2613-
}
26142611
pkt_dev->cur_daddr = htonl(t);
26152612
}
26162613
}

0 commit comments

Comments
 (0)