qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strd


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strdup()
Date: Thu, 19 Jun 2014 13:03:48 +0200

From: Markus Armbruster <address@hidden>

Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
 ui/vnc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index d771a2c..6c9d4f3 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3009,10 +3009,7 @@ int vnc_display_password(DisplayState *ds, const char 
*password)
     }
 
     g_free(vs->password);
-    vs->password = NULL;
-    if (password) {
-        vs->password = g_strdup(password);
-    }
+    vs->password = g_strdup(password);
 
     return 0;
 }
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]