From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxJ9-000465-C7 for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsxIx-0008MM-LX for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:47:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxIx-0008M3-Dm for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:47:47 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s56GlkIL016614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 6 Jun 2014 12:47:46 -0400 From: Markus Armbruster Date: Fri, 6 Jun 2014 18:47:44 +0200 Message-Id: <1402073264-9606-3-git-send-email-armbru@redhat.com> In-Reply-To: <1402073264-9606-1-git-send-email-armbru@redhat.com> References: <1402073264-9606-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v2 2/2] 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: kraxel@redhat.com Signed-off-by: Markus Armbruster --- 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.9.3