aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-06-06 18:47:44 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-06-19 12:48:07 +0200
commitc14e98479bd3cb3667e283e815c238135db2edc1 (patch)
treeab4a6188c36cea2cb3a7dc76553f8874cb7d8a37 /ui/vnc.c
parent64641d876466333b833e8a188a46e2e06c008bac (diff)
downloadqemu-c14e98479bd3cb3667e283e815c238135db2edc1.zip
qemu-c14e98479bd3cb3667e283e815c238135db2edc1.tar.gz
qemu-c14e98479bd3cb3667e283e815c238135db2edc1.tar.bz2
vnc: Drop superfluous conditionals around g_strdup()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r--ui/vnc.c5
1 files changed, 1 insertions, 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;
}