From patchwork Thu Jul 3 15:57:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 366925 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AF503140144 for ; Fri, 4 Jul 2014 01:58:10 +1000 (EST) Received: from localhost ([::1]:60466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2jOi-00007m-S8 for incoming@patchwork.ozlabs.org; Thu, 03 Jul 2014 11:58:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2jOF-0008IJ-NZ for qemu-devel@nongnu.org; Thu, 03 Jul 2014 11:57:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2jO6-0005Ox-Mu for qemu-devel@nongnu.org; Thu, 03 Jul 2014 11:57:39 -0400 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]:63202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2jO6-0005Ob-Fh; Thu, 03 Jul 2014 11:57:30 -0400 Received: by mail-pd0-f172.google.com with SMTP id w10so435331pde.3 for ; Thu, 03 Jul 2014 08:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=/3NpSH5sdXx3n8RWS6uPbL5n/RyFbfpU3E04SJK0XPE=; b=zqqMGsc7C3bXkft/US9Z7sQUZolR8MhdEGAoukaMYgoej4M6VW01uY4pIEa6KlPqQn TXyRaMQXC0DQY7Byn7ombc11bbrYMNAoWtTXpbutz/1meu+deejW8omj4GIOMzwlVSYm KIDArACKgl+54x97za55NoIgzx8vDvDyV+o6z6XR0jXKYQoUYs9FGsSlwTrTIVU5TFxe fZ5gc+LjjfLszNpcCiEFE+bq0/FtsnfHmFXYSLkVEyztFd/fOxfojYwGs7FSJ30GaWGO Kg/429xD8HUF8ZanDtyAsVTeIcdPAqBLmdlM6DnVhovz9HHPj7G/IpWJJYZzafyVBoTi XLBQ== X-Received: by 10.70.34.39 with SMTP id w7mr4955682pdi.19.1404403048484; Thu, 03 Jul 2014 08:57:28 -0700 (PDT) Received: from [192.168.1.104] ([223.72.65.68]) by mx.google.com with ESMTPSA id oa17sm5306080pdb.46.2014.07.03.08.57.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 03 Jul 2014 08:57:27 -0700 (PDT) Message-ID: <53B57D5B.2070204@gmail.com> Date: Thu, 03 Jul 2014 23:57:15 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Michael Tokarev X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::22c Cc: Kevin Wolf , qemu-trivial@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com Subject: [Qemu-devel] [PATCH trivial] qemu-img: Remove redundancy "ret = -1" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org In this case, 'ret' is already '-1', so need not do it again. Signed-off-by: Chen Gang --- qemu-img.c | 1 - 1 file changed, 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index c98896b..d4518e7 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -246,7 +246,6 @@ static int read_password(char *buf, int buf_size) if (errno == EAGAIN || errno == EINTR) { continue; } else { - ret = -1; break; } } else if (ret == 0) {