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

Message ID 20180709134056.7060-10-aserdean@ovn.org
State New
Headers show
Series
  • Cleanup datapath-windows
Related show

Commit Message

Alin Gabriel Serdean July 9, 2018, 1:40 p.m.
Assign variable directly instead of reassigning it after.

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

Patch

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 */