summaryrefslogtreecommitdiff
path: root/datapath-windows
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2017-07-14 04:40:57 +0000
committerBen Pfaff <blp@ovn.org>2017-08-02 11:32:32 -0700
commit7ce89fa2d4a6021d9e9321d200bb886992053949 (patch)
treebc5a4d3ba876434ce03bd51a96c29fa8eab9236e /datapath-windows
parent3630a2f321226bce0306c6a8834812a0dd4dc88f (diff)
downloadopenvswitch-7ce89fa2d4a6021d9e9321d200bb886992053949.tar.gz
datapath-windows: Treat TCP_HDR_LEN static analysis warnings
Using the shift operator in macros makes the static analyzer on WDK 8.1 confused. Switch to multiplication when trying to get the data offset of the TCP header. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Shashank Ram <rams@vmware.com>
Diffstat (limited to 'datapath-windows')
-rw-r--r--datapath-windows/ovsext/NetProto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/NetProto.h b/datapath-windows/ovsext/NetProto.h
index 92d6611a2..9a17deee7 100644
--- a/datapath-windows/ovsext/NetProto.h
+++ b/datapath-windows/ovsext/NetProto.h
@@ -68,7 +68,7 @@ typedef UINT64 IP4FragUnitLength;
// length UINT for ipv6 header length.
typedef UINT64 IP6UnitLength;
-#define TCP_HDR_LEN(tcph) IP4_UNITS_TO_BYTES((tcph)->doff)
+#define TCP_HDR_LEN(tcph) ((tcph)->doff * 4)
#define TCP_DATA_LENGTH(iph, tcph) (ntohs(iph->tot_len) - \
IP4_HDR_LEN(iph) - TCP_HDR_LEN(tcph))