From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxM9-0008Vy-Jb for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsxM2-00012A-44 for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:51:05 -0400 Received: from oxygen.pond.sub.org ([144.76.244.19]:56913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxM1-000123-0U for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:50:57 -0400 Received: from blackfin.pond.sub.org (p5B328A66.dip0.t-ipconnect.de [91.50.138.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by oxygen.pond.sub.org (Postfix) with ESMTPSA id 5C20B25D27 for ; Fri, 6 Jun 2014 18:50:56 +0200 (CEST) From: Markus Armbruster References: <1402072618-7103-1-git-send-email-armbru@redhat.com> <1402072618-7103-3-git-send-email-armbru@redhat.com> <5391EE9B.60707@redhat.com> Date: Fri, 06 Jun 2014 18:50:55 +0200 In-Reply-To: <5391EE9B.60707@redhat.com> (Paolo Bonzini's message of "Fri, 06 Jun 2014 18:38:51 +0200") Message-ID: <87ppimdlsg.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [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: Paolo Bonzini Cc: qemu-devel@nongnu.org, kraxel@redhat.com Paolo Bonzini writes: > Il 06/06/2014 18:36, Markus Armbruster ha scritto: >> 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); > > You have a dead store now. :) Noticed right after I sent %-} Thanks!