[ovs-dev] [PATCH 12/14] datapath-windows: Cleanup Tunnel.c
Alin Gabriel Serdean
aserdean at ovn.org
Mon Jul 9 13:40:54 UTC 2018
Assign variables directly instead of reassigning them after.
Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
---
datapath-windows/ovsext/Tunnel.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/datapath-windows/ovsext/Tunnel.c b/datapath-windows/ovsext/Tunnel.c
index ad2c254f5..899fce885 100644
--- a/datapath-windows/ovsext/Tunnel.c
+++ b/datapath-windows/ovsext/Tunnel.c
@@ -65,7 +65,7 @@ OvsTunnelAnalyzePacket(OVS_TUNNEL_PENDED_PACKET *packet)
NTSTATUS status = STATUS_SUCCESS;
UINT32 packetLength = 0;
ULONG bytesCopied = 0;
- NET_BUFFER_LIST *copiedNBL = NULL;
+ NET_BUFFER_LIST *copiedNBL;
NET_BUFFER *netBuffer;
NDIS_STATUS ndisStatus;
@@ -248,12 +248,12 @@ OvsInjectPacketThroughActions(PNET_BUFFER_LIST pNbl,
sendCompleteFlags);
{
- POVS_VPORT_ENTRY vport = NULL;
+ POVS_VPORT_ENTRY vport;
UINT32 portNo = 0;
OVS_PACKET_HDR_INFO layers = { 0 };
OvsFlowKey key = { 0 };
UINT64 hash = 0;
- PNET_BUFFER curNb = NULL;
+ PNET_BUFFER curNb = NET_BUFFER_LIST_FIRST_NB(pNbl);
OvsFlow *flow = NULL;
fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(pNbl);
@@ -265,7 +265,6 @@ OvsInjectPacketThroughActions(PNET_BUFFER_LIST pNbl,
* We still need to check if the Ethernet header of the innet packet is in a single MD
*/
- curNb = NET_BUFFER_LIST_FIRST_NB(pNbl);
ASSERT(curNb->Next == NULL);
NdisAcquireRWLockRead(gOvsSwitchContext->dispatchLock, &lockState, dispatch);
--
2.16.1.windows.1
More information about the dev
mailing list