This is the way usually used in OVS.

Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 lib/dp-packet.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index 9dbb611d95fb..8f52feeefa39 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -615,46 +615,46 @@ dp_packet_rss_invalidate(struct dp_packet *p)
 }
 
 static inline bool
-dp_packet_ip_checksum_valid(struct dp_packet *p)
+dp_packet_ip_checksum_valid(struct dp_packet *p OVS_UNUSED)
 {
 #ifdef DPDK_NETDEV
     return (p->mbuf.ol_flags & PKT_RX_IP_CKSUM_MASK) ==
             PKT_RX_IP_CKSUM_GOOD;
 #else
-    return 0 && p;
+    return false;
 #endif
 }
 
 static inline bool
-dp_packet_ip_checksum_bad(struct dp_packet *p)
+dp_packet_ip_checksum_bad(struct dp_packet *p OVS_UNUSED)
 {
 #ifdef DPDK_NETDEV
     return (p->mbuf.ol_flags & PKT_RX_IP_CKSUM_MASK) ==
             PKT_RX_IP_CKSUM_BAD;
 #else
-    return 0 && p;
+    return false;
 #endif
 }
 
 static inline bool
-dp_packet_l4_checksum_valid(struct dp_packet *p)
+dp_packet_l4_checksum_valid(struct dp_packet *p OVS_UNUSED)
 {
 #ifdef DPDK_NETDEV
     return (p->mbuf.ol_flags & PKT_RX_L4_CKSUM_MASK) ==
             PKT_RX_L4_CKSUM_GOOD;
 #else
-    return 0 && p;
+    return false;
 #endif
 }
 
 static inline bool
-dp_packet_l4_checksum_bad(struct dp_packet *p)
+dp_packet_l4_checksum_bad(struct dp_packet *p OVS_UNUSED)
 {
 #ifdef DPDK_NETDEV
     return (p->mbuf.ol_flags & PKT_RX_L4_CKSUM_MASK) ==
             PKT_RX_L4_CKSUM_BAD;
 #else
-    return 0 && p;
+    return false;
 #endif
 }
 
-- 
2.10.2

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to