]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qemu-img: remove dead check
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Jan 2017 14:56:24 +0000 (15:56 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 24 Jan 2017 20:26:53 +0000 (23:26 +0300)
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>
qemu-img.c

index 5df66fe6614cdcc9a6b9cd3ab852509cc356c0ee..74e33626536194b5e5803dc457c6a7a61d7434af 100644 (file)
@@ -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() */