diff options
| author | Jeff Cody | 2017-11-07 23:27:20 +0100 |
|---|---|---|
| committer | Jeff Cody | 2017-12-18 21:41:17 +0100 |
| commit | ac90dad94b5b1eda18a9a86c739c249d851cd35c (patch) | |
| tree | c774c77d158d2bc82d15a856206ed059c22b2846 | |
| parent | blockjob: kick jobs on set-speed (diff) | |
| download | qemu-ac90dad94b5b1eda18a9a86c739c249d851cd35c.tar.gz qemu-ac90dad94b5b1eda18a9a86c739c249d851cd35c.tar.xz qemu-ac90dad94b5b1eda18a9a86c739c249d851cd35c.zip | |
block/sheepdog: remove spurious NULL check
'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>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
| -rw-r--r-- | block/sheepdog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c index 696a71442a..459d93a35f 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; |
