mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
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>
This commit is contained in:
parent
d62d1eb627
commit
ece9086eb5
1 changed files with 5 additions and 7 deletions
12
qemu-img.c
12
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() */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue