|
| From: | Paolo Bonzini |
| Subject: | Re: [Qemu-devel] [PATCH 2/2] vnc: Drop superfluous conditionals around g_strdup() |
| Date: | Fri, 06 Jun 2014 18:38:51 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Il 06/06/2014 18:36, Markus Armbruster ha scritto:
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);
You have a dead store now. :) Paolo
return 0;
}
| [Prev in Thread] | Current Thread | [Next in Thread] |