From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxAa-0002nc-RD for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:39:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsxAN-0004jY-UV for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:39:08 -0400 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:38848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxAN-0004jA-NN for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:38:55 -0400 Received: by mail-we0-f174.google.com with SMTP id k48so3169105wev.33 for ; Fri, 06 Jun 2014 09:38:54 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5391EE9B.60707@redhat.com> Date: Fri, 06 Jun 2014 18:38:51 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1402072618-7103-1-git-send-email-armbru@redhat.com> <1402072618-7103-3-git-send-email-armbru@redhat.com> In-Reply-To: <1402072618-7103-3-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Markus Armbruster , qemu-devel@nongnu.org Cc: kraxel@redhat.com 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. :) Paolo > return 0; > } >