It's confusing when two different variables have the same name in one function.
Cc: Reda Sallahi <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]> --- qemu-img.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 0ad698d..c285c2f 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4249,15 +4249,12 @@ static int img_dd(int argc, char **argv) case 'U': force_share = true; break; - case OPTION_OBJECT: { - QemuOpts *opts; - opts = qemu_opts_parse_noisily(&qemu_object_opts, - optarg, true); - if (!opts) { + case OPTION_OBJECT: + if (!qemu_opts_parse_noisily(&qemu_object_opts, optarg, true)) { ret = -1; goto out; } - } break; + break; case OPTION_IMAGE_OPTS: image_opts = true; break; -- 2.9.4
