qemu-img: remove dead check
PATCH 1/1 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 <[email protected]>
--- qemu-img.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
qemu-img.c +5 -7
@@ -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() */
Signature · 1 line
2.9.3
Quoted 7 lines · Paolo Bonzini
options must be non-NULL here, because it has been checked before. Reported by Coverity.
Signed-off-by Paolo Bonzini <[email protected]>--- qemu-img.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
Reviewed-by Eric Blake <[email protected]>
(not shown in the diff, but several lines earlier, is:
if (!options) {
error_exit("Must specify options (-o)");
})
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Michael Tokarev
AppliedQuoted 2 lines · Paolo Bonzini
options must be non-NULL here, because it has been checked before. Reported by Coverity.
Applied to -trivial, thanks!
/mjt