[ovs-dev] [PATCH 09/14] datapath-windows: Cleanup Oid.c

Alin Gabriel Serdean aserdean at ovn.org
Mon Jul 9 13:40:51 UTC 2018


Assign variable directly instead of reassigning it after.

Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
---
 datapath-windows/ovsext/Oid.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/datapath-windows/ovsext/Oid.c b/datapath-windows/ovsext/Oid.c
index 7c7ffe750..ff9a42690 100644
--- a/datapath-windows/ovsext/Oid.c
+++ b/datapath-windows/ovsext/Oid.c
@@ -310,7 +310,7 @@ OvsProcessMethodOid(POVS_SWITCH_CONTEXT switchObject,
     NDIS_STATUS status = NDIS_STATUS_SUCCESS;
     struct _METHOD *methodInfo = &(oidRequest->DATA.METHOD_INFORMATION);
     struct _SET *nicReqSetInfo = NULL;
-    PNDIS_OBJECT_HEADER header = NULL;
+    PNDIS_OBJECT_HEADER header = methodInfo->InformationBuffer;
     PNDIS_OID_REQUEST nicOidRequest = NULL;
 
     UNREFERENCED_PARAMETER(switchObject);
@@ -320,7 +320,6 @@ OvsProcessMethodOid(POVS_SWITCH_CONTEXT switchObject,
 
     *complete = FALSE;
     *bytesNeededParam = 0;
-    header = methodInfo->InformationBuffer;
 
     switch(methodInfo->Oid) {
     /* We deal with only OID_SWITCH_NIC_REQUEST as of now */
-- 
2.16.1.windows.1



More information about the dev mailing list