Skip to content

Commit e8830d5

Browse files
Alin Serdeanshettyg
authored andcommitted
datapath-windows: clean code in vxlan
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>
1 parent 925f669 commit e8830d5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

datapath-windows/ovsext/Vxlan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ OvsDoEncapVxlan(POVS_VPORT_ENTRY vport,
260260

261261
/* L2 header */
262262
ethHdr = (EthHdr *)bufferStart;
263-
ASSERT(((PCHAR)&fwdInfo->dstMacAddr + sizeof fwdInfo->dstMacAddr) ==
264-
(PCHAR)&fwdInfo->srcMacAddr);
265263
NdisMoveMemory(ethHdr->Destination, fwdInfo->dstMacAddr,
266-
sizeof ethHdr->Destination + sizeof ethHdr->Source);
264+
sizeof ethHdr->Destination);
265+
NdisMoveMemory(ethHdr->Source, fwdInfo->srcMacAddr,
266+
sizeof ethHdr->Source);
267267
ethHdr->Type = htons(ETH_TYPE_IPV4);
268268

269269
/* IP header */

0 commit comments

Comments
 (0)