diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-01-04 15:56:24 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2017-01-24 23:26:53 +0300 |
commit | ece9086eb5e3f05e6a3ebb2ec3242932c3b37963 (patch) | |
tree | dfd73c192cdae31c1619c5c8b53b80651b59a824 | |
parent | d62d1eb627bc9b10b26fabda5d643e3b77cb54dd (diff) |
qemu-img: remove dead check
options must be non-NULL here, because it has been checked before.
Reported by Coverity.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | qemu-img.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/qemu-img.c b/qemu-img.c index 5df66fe661..74e3362653 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3455,13 +3455,11 @@ static int img_amend(int argc, char **argv) create_opts = qemu_opts_append(create_opts, bs->drv->create_opts); opts = qemu_opts_create(create_opts, NULL, 0, &error_abort); - if (options) { - qemu_opts_do_parse(opts, options, NULL, &err); - if (err) { - error_report_err(err); - ret = -1; - goto out; - } + qemu_opts_do_parse(opts, options, NULL, &err); + if (err) { + error_report_err(err); + ret = -1; + goto out; } /* In case the driver does not call amend_status_cb() */ |