* [Qemu-devel] [PATCH] qemu-img: remove dead check
@ 2017-01-04 14:56 Paolo Bonzini
2017-01-04 16:49 ` Eric Blake
2017-01-12 10:53 ` Michael Tokarev
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2017-01-04 14:56 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial
options must be non-NULL here, because it has been checked before.
Reported by Coverity.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
qemu-img.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 5df66fe..74e3362 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() */
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-img: remove dead check
2017-01-04 14:56 [Qemu-devel] [PATCH] qemu-img: remove dead check Paolo Bonzini
@ 2017-01-04 16:49 ` Eric Blake
2017-01-12 10:53 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2017-01-04 16:49 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
On 01/04/2017 08:56 AM, Paolo Bonzini wrote:
> options must be non-NULL here, because it has been checked before.
> Reported by Coverity.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> qemu-img.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
(not shown in the diff, but several lines earlier, is:
if (!options) {
error_exit("Must specify options (-o)");
}
)
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-img: remove dead check
2017-01-04 14:56 [Qemu-devel] [PATCH] qemu-img: remove dead check Paolo Bonzini
2017-01-04 16:49 ` Eric Blake
@ 2017-01-12 10:53 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2017-01-12 10:53 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial
04.01.2017 17:56, Paolo Bonzini wrote:
> options must be non-NULL here, because it has been checked before.
> Reported by Coverity.
Applied to -trivial, thanks!
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-12 10:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-04 14:56 [Qemu-devel] [PATCH] qemu-img: remove dead check Paolo Bonzini
2017-01-04 16:49 ` Eric Blake
2017-01-12 10:53 ` Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.