]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath-windows: clean code in geneve
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Thu, 27 Oct 2016 18:57:12 +0000 (18:57 +0000)
committerGurucharan Shetty <guru@ovn.org>
Fri, 4 Nov 2016 15:01:13 +0000 (08:01 -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/Geneve.c

index 5712e4daaa35bd7f0490a2ce6a1fd1e6fec6c8f7..efdf9f71cb0ebf72de9848e2cb43eb5aaaa2fcdd 100644 (file)
@@ -170,10 +170,10 @@ NDIS_STATUS OvsEncapGeneve(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 */