[ovs-dev] [PATCH 2/5 v2] datapath-windows: clean code in stt

Alin Serdean aserdean at cloudbasesolutions.com
Thu Oct 27 18:55:14 UTC 2016


The purpose of this patch is to make the code more readable and
fix a static analyzer warning.

Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
---
 datapath-windows/ovsext/Stt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/datapath-windows/ovsext/Stt.c b/datapath-windows/ovsext/Stt.c
index ad322d2..b04a77f 100644
--- a/datapath-windows/ovsext/Stt.c
+++ b/datapath-windows/ovsext/Stt.c
@@ -278,10 +278,10 @@ OvsDoEncapStt(POVS_VPORT_ENTRY vport,
         sttHdr = (SttHdr *) (outerTcpHdr + 1);
 
         /* L2 header */
-        ASSERT(((PCHAR)&fwdInfo->dstMacAddr + sizeof fwdInfo->dstMacAddr) ==
-                (PCHAR)&fwdInfo->srcMacAddr);
         NdisMoveMemory(outerEthHdr->Destination, fwdInfo->dstMacAddr,
-                        sizeof outerEthHdr->Destination + sizeof outerEthHdr->Source);
+                       sizeof outerEthHdr->Destination);
+        NdisMoveMemory(outerEthHdr->Source, fwdInfo->srcMacAddr,
+                       sizeof outerEthHdr->Source);
         outerEthHdr->Type = htons(ETH_TYPE_IPV4);
 
         /* L3 header */
-- 
2.9.2.windows.1



More information about the dev mailing list