]> git.proxmox.com Git - ovs.git/commitdiff
datapath-windows: clean code in vxlan
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Thu, 27 Oct 2016 18:53:54 +0000 (18:53 +0000)
committerGurucharan Shetty <guru@ovn.org>
Fri, 4 Nov 2016 14:59:40 +0000 (07:59 -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/Vxlan.c

index ddd8d8e4020c8b6d97dbdc281e9fff316c5ea189..db452483ac373f001d690cf4e711f4581a374d33 100644 (file)
@@ -260,10 +260,10 @@ OvsDoEncapVxlan(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);
 
         /* IP header */