From: Elena Afanasova <eafanasova@gmail.com>
To: kwolf@redhat.com, mreitz@redhat.com, qemu-block@nongnu.org
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH] block/qcow2-cluster: remove dead code
Date: Thu, 15 Oct 2020 05:13:54 -0700 [thread overview]
Message-ID: <e04b538ddbf6b6612c0c94602740ff78a98812d7.camel@gmail.com> (raw)
Since handle_dependencies() returns 0 or -EAGAIN the following case can be removed.
Spotted by PVS-Studio.
Signed-off-by: Elena Afanasova <eafanasova@gmail.com>
---
block/qcow2-cluster.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index aa87d3e99b..e2e0db0cc9 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -1806,8 +1806,6 @@ again:
* structs before starting over. */
assert(*m == NULL);
goto again;
- } else if (ret < 0) {
- return ret;
} else if (cur_bytes == 0) {
break;
} else {
--
2.25.1
next reply other threads:[~2020-10-15 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 12:13 Elena Afanasova [this message]
2020-10-15 12:45 ` [PATCH] block/qcow2-cluster: remove dead code Kevin Wolf
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=e04b538ddbf6b6612c0c94602740ff78a98812d7.camel@gmail.com \
--to=eafanasova@gmail.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).