[ovs-dev] [PATCH 07/14] datapath-windows: Cleanup Netlink.c

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


Assign variable directly instead of reassigning it after.

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

diff --git a/datapath-windows/ovsext/Netlink/Netlink.c b/datapath-windows/ovsext/Netlink/Netlink.c
index 156732cdb..718adba39 100644
--- a/datapath-windows/ovsext/Netlink/Netlink.c
+++ b/datapath-windows/ovsext/Netlink/Netlink.c
@@ -563,9 +563,7 @@ UINT32
 NlMsgStartNested(PNL_BUFFER buf, UINT16 type)
 {
     UINT32 offset = NlBufSize(buf);
-    PCHAR nlaData = NULL;
-
-    nlaData = NlMsgPutTailUnspecUninit(buf, type, 0);
+    PCHAR nlaData = NlMsgPutTailUnspecUninit(buf, type, 0);
 
     if (!nlaData) {
         /* Value zero must be reated as error by the caller.
-- 
2.16.1.windows.1



More information about the dev mailing list