qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/2] vnc: Drop superfluous conditionals around g_str


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH 2/2] vnc: Drop superfluous conditionals around g_strdup()
Date: Fri, 6 Jun 2014 18:36:58 +0200

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

diff --git a/ui/vnc.c b/ui/vnc.c
index d771a2c..0853ded 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3010,9 +3010,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.9.3




reply via email to

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