From c14e98479bd3cb3667e283e815c238135db2edc1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 6 Jun 2014 18:47:44 +0200 Subject: vnc: Drop superfluous conditionals around g_strdup() Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ui/vnc.c') diff --git a/ui/vnc.c b/ui/vnc.c index d771a2cd4f..6c9d4f3492 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; } -- cgit v1.2.3