[ovs-dev,04/14] datapath-windows: Cleanup Datapath.c

Message ID 20180709134056.7060-5-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.

Do not assign an initial value to `inputBuffer`, it will be assigned later
on.

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

Patch

diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c
index 34ef2b40a..448558701 100644
--- a/datapath-windows/ovsext/Datapath.c
+++ b/datapath-windows/ovsext/Datapath.c
@@ -407,7 +407,7 @@  FreeUserDumpState(POVS_OPEN_INSTANCE instance)
 NDIS_STATUS
 OvsInit()
 {
-    NDIS_STATUS status = NDIS_STATUS_SUCCESS;
+    NDIS_STATUS status;
 
     gOvsCtrlLock = &ovsCtrlLockObj;
     NdisAllocateSpinLock(gOvsCtrlLock);
@@ -720,7 +720,7 @@  OvsDeviceControl(PDEVICE_OBJECT deviceObject,
     PIO_STACK_LOCATION irpSp;
     NTSTATUS status = STATUS_SUCCESS;
     PFILE_OBJECT fileObject;
-    PVOID inputBuffer = NULL;
+    PVOID inputBuffer;
     PVOID outputBuffer = NULL;
     UINT32 inputBufferLen, outputBufferLen;
     UINT32 code, replyLen = 0;