diff options
author | Paul Durrant <paul.durrant@citrix.com> | 2019-02-15 16:25:32 +0000 |
---|---|---|
committer | Anthony PERARD <anthony.perard@citrix.com> | 2019-02-28 17:21:12 +0000 |
commit | 210b9776376698c50060e5383ccfac1170ae01a2 (patch) | |
tree | 2a830751e9f28d7d7d56d78855c149170a93ef37 /hw | |
parent | e02d94941d9c26035d5c2e5075c83afbe8c5eaef (diff) | |
download | qemu-210b9776376698c50060e5383ccfac1170ae01a2.zip qemu-210b9776376698c50060e5383ccfac1170ae01a2.tar.gz qemu-210b9776376698c50060e5383ccfac1170ae01a2.tar.bz2 |
xen-block: remove redundant assignment
The assignment to 'p' is unnecessary as the code will either goto 'invalid'
or p will get overwritten.
Spotted by Coverity: CID 1398638
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20190215162533.19475-3-paul.durrant@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/xen-block.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 5012af9..29afe27 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -413,8 +413,7 @@ static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name, } if (*end == 'p') { - p = (char *) ++end; - if (*end == '\0') { + if (*(++end) == '\0') { goto invalid; } } |