]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath-windows: clean code in gre
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Thu, 27 Oct 2016 18:55:36 +0000 (18:55 +0000)
committerGurucharan Shetty <guru@ovn.org>
Fri, 4 Nov 2016 15:00:46 +0000 (08:00 -0700)
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@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
datapath-windows/ovsext/Gre.c

index 1976b08f1503056ea8ff6c7bd9696c877655cdf3..7d6c0a218e080a3182b882b31dee27478c9548a6 100644 (file)
@@ -215,10 +215,10 @@ OvsDoEncapGre(POVS_VPORT_ENTRY vport,
 
         /* L2 header */
         ethHdr = (EthHdr *)bufferStart;
-        ASSERT(((PCHAR)&fwdInfo->dstMacAddr + sizeof fwdInfo->dstMacAddr) ==
-               (PCHAR)&fwdInfo->srcMacAddr);
         NdisMoveMemory(ethHdr->Destination, fwdInfo->dstMacAddr,
-                       sizeof ethHdr->Destination + sizeof ethHdr->Source);
+                       sizeof ethHdr->Destination);
+        NdisMoveMemory(ethHdr->Source, fwdInfo->srcMacAddr,
+                       sizeof ethHdr->Source);
         ethHdr->Type = htons(ETH_TYPE_IPV4);
 #if DBG
         counterHeadRoom -= sizeof *ethHdr;