From: Alin Serdean <aserd...@cloudbasesolutions.com>

`ethHdr` cannot be NULL because we did a partial copy before it.

Add an assert to keep the static analysis happy.

Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>
---
v2: switch from if to assert
---
 datapath-windows/ovsext/Actions.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/datapath-windows/ovsext/Actions.c 
b/datapath-windows/ovsext/Actions.c
index 0af4a66..9bbc787 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
@@ -1237,6 +1237,7 @@ OvsActionMplsPush(OvsForwardingContext *ovsFwdCtx,
     ASSERT(mdlLen >= MPLS_HLEN);
 
     ethHdr = (EthHdr *)(bufferStart + curMdlOffset);
+    ASSERT(ethHdr);
     RtlMoveMemory(ethHdr, (UINT8*)ethHdr + MPLS_HLEN, sizeof(*ethHdr));
     ethHdr->Type = mpls->mpls_ethertype;
 
-- 
2.10.2.windows.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to