From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsx8g-0008O2-4a for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:37:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wsx8X-0004Ab-Qe for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:37:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsx8X-0004AF-JN for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:37:01 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s56Gb15T011639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 6 Jun 2014 12:37:01 -0400 From: Markus Armbruster Date: Fri, 6 Jun 2014 18:36:58 +0200 Message-Id: <1402072618-7103-3-git-send-email-armbru@redhat.com> In-Reply-To: <1402072618-7103-1-git-send-email-armbru@redhat.com> References: <1402072618-7103-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 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 | 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); return 0; } -- 1.9.3