All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, mitake.hitoshi@lab.ntt.co.jp,
	namei.unix@gmail.com, rjones@redhat.com, kwolf@redhat.com,
	eblake@redhat.com
Subject: [Qemu-devel] [PATCH v3 3/7] block/sheepdog: remove spurious NULL check
Date: Tue,  7 Nov 2017 17:27:20 -0500	[thread overview]
Message-ID: <fa437e7bf3f9d825544d3833f779b417ba1f39a3.1510093478.git.jcody@redhat.com> (raw)
In-Reply-To: <cover.1510093478.git.jcody@redhat.com>
In-Reply-To: <cover.1510093478.git.jcody@redhat.com>

'tag' is already checked in the lines immediately preceding this check,
and set to non-NULL if NULL.  No need to check again, it hasn't changed.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 block/sheepdog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/sheepdog.c b/block/sheepdog.c
index 696a714..459d93a 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1632,7 +1632,7 @@ static int sd_open(BlockDriverState *bs, QDict *options, int flags,
     if (!tag) {
         tag = "";
     }
-    if (tag && strlen(tag) >= SD_MAX_VDI_TAG_LEN) {
+    if (strlen(tag) >= SD_MAX_VDI_TAG_LEN) {
         error_setg(errp, "value of parameter 'tag' is too long");
         ret = -EINVAL;
         goto err_no_fd;
-- 
2.9.5

  parent reply	other threads:[~2017-11-07 22:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 22:27 [Qemu-devel] [PATCH v3 0/7] Code cleanup and minor fixes (for 2.11) Jeff Cody
2017-11-07 22:27 ` [Qemu-devel] [PATCH v3 1/7] block/ssh: don't call libssh2_init() in block_init() Jeff Cody
2017-11-07 22:48   ` Eric Blake
2017-11-08 11:39   ` Richard W.M. Jones
2017-11-07 22:27 ` [Qemu-devel] [PATCH v3 2/7] block/ssh: make compliant with coding guidelines Jeff Cody
2017-11-08 10:50   ` [Qemu-devel] [Qemu-block] " Darren Kenny
2017-11-08 11:38   ` [Qemu-devel] " Richard W.M. Jones
2017-11-07 22:27 ` Jeff Cody [this message]
2017-11-08 10:48   ` [Qemu-devel] [Qemu-block] [PATCH v3 3/7] block/sheepdog: remove spurious NULL check Darren Kenny
2017-11-07 22:27 ` [Qemu-devel] [PATCH v3 4/7] block/sheepdog: code beautification Jeff Cody
2017-11-08 10:52   ` [Qemu-devel] [Qemu-block] " Darren Kenny
2017-11-07 22:27 ` [Qemu-devel] [PATCH v3 5/7] block/curl: check error return of curl_global_init() Jeff Cody
2017-11-08 10:51   ` [Qemu-devel] [Qemu-block] " Darren Kenny
2017-11-08 11:41   ` [Qemu-devel] " Richard W.M. Jones
2017-11-07 22:27 ` [Qemu-devel] [PATCH v3 6/7] block/curl: fix minor memory leaks Jeff Cody
2017-11-08  0:13   ` Eric Blake
2017-11-08  5:08   ` Philippe Mathieu-Daudé
2017-11-08 11:45   ` Richard W.M. Jones
2017-11-07 22:27 ` [Qemu-devel] [PATCH v3 7/7] block/curl: code cleanup to comply with coding style Jeff Cody
2017-11-08 10:47   ` [Qemu-devel] [Qemu-block] " Darren Kenny
2017-11-08 14:26     ` Eric Blake
2017-11-08 14:50       ` Darren Kenny
2017-11-08 15:04         ` Paolo Bonzini
2017-11-08 15:01     ` Paolo Bonzini
2017-11-08 11:46   ` [Qemu-devel] " Richard W.M. Jones
2017-12-18 21:05 ` [Qemu-devel] [PATCH v3 0/7] Code cleanup and minor fixes (for 2.11) Jeff Cody

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=fa437e7bf3f9d825544d3833f779b417ba1f39a3.1510093478.git.jcody@redhat.com \
    --to=jcody@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mitake.hitoshi@lab.ntt.co.jp \
    --cc=namei.unix@gmail.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@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.