aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2017-06-19 16:00:02 +0100
committerMax Reitz <mreitz@redhat.com>2017-06-26 14:54:46 +0200
commit2a245709099e98bca638694c182f1e5627567df7 (patch)
treeeb0666929a0bb50eec2b6c6e69151919691ff3f7 /qemu-img.c
parentf69165a8feca055cf4a37d13ab0fc5beec3cb372 (diff)
qemu-img: don't shadow opts variable in img_dd()
It's confusing when two different variables have the same name in one function. Cc: Reda Sallahi <fullmanet@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20170619150002.3033-1-stefanha@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/qemu-img.c b/qemu-img.c
index e70d5155e4..91ad6bebbf 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -4255,15 +4255,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;