All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	stefanha@redhat.com
Subject: [Qemu-trivial] [PATCH trivial] qemu-img: Remove redundancy "ret = -1"
Date: Thu, 03 Jul 2014 23:57:15 +0800	[thread overview]
Message-ID: <53B57D5B.2070204@gmail.com> (raw)

In this case, 'ret' is already '-1', so need not do it again.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 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) {
-- 
1.7.11.7


WARNING: multiple messages have this Message-ID (diff)
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	stefanha@redhat.com
Subject: [Qemu-devel] [PATCH trivial] qemu-img: Remove redundancy "ret = -1"
Date: Thu, 03 Jul 2014 23:57:15 +0800	[thread overview]
Message-ID: <53B57D5B.2070204@gmail.com> (raw)

In this case, 'ret' is already '-1', so need not do it again.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 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) {
-- 
1.7.11.7

             reply	other threads:[~2014-07-03 15:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 15:57 Chen Gang [this message]
2014-07-03 15:57 ` [Qemu-devel] [PATCH trivial] qemu-img: Remove redundancy "ret = -1" Chen Gang
2014-07-09 13:58 ` [Qemu-trivial] " Michael Tokarev
2014-07-09 13:58   ` [Qemu-devel] " Michael Tokarev
2014-07-10  2:33   ` Chen Gang
2014-07-10  2:33     ` [Qemu-devel] " Chen Gang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B57D5B.2070204@gmail.com \
    --to=gang.chen.5i5j@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.