Skip to content

Commit 87fcebd

Browse files
committed
Remove superfluous braces
1 parent e5a8cba commit 87fcebd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

xdp-bpf2go-example/packetProtocol.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ int get_packet_protocol(struct xdp_md *ctx) {
2828
return XDP_PASS;
2929

3030
// Check if the packet is an IP packet
31-
if (eth->h_proto != bpf_htons(ETH_P_IP)) {
31+
if (eth->h_proto != bpf_htons(ETH_P_IP))
3232
return XDP_PASS;
33-
}
3433

3534
// Parse IP header
36-
if ((void *)(ip + 1) > data_end) {
35+
if ((void *)(ip + 1) > data_end)
3736
return XDP_PASS;
38-
}
3937

4038
if (count)
4139
__sync_fetch_and_add(count, 1);

0 commit comments

Comments
 (0)