Received: from eggs.gnu.org ([2001:4830:134:3::10]:36156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxa8V-0005Rj-FE for qemu-devel@nongnu.org; Thu, 19 Jun 2014 07:04:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxa8M-0000sg-4t for qemu-devel@nongnu.org; Thu, 19 Jun 2014 07:04:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxa8L-0000sb-Ta for qemu-devel@nongnu.org; Thu, 19 Jun 2014 07:03:58 -0400 From: Gerd Hoffmann Date: Thu, 19 Jun 2014 13:03:48 +0200 Message-Id: <1403175829-24595-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1403175829-24595-1-git-send-email-kraxel@redhat.com> References: <1403175829-24595-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strdup() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Markus Armbruster , Anthony Liguori , Gerd Hoffmann From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- 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