diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-05-25 14:44:55 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-06-03 16:43:27 +0100 |
commit | 2c398ee5e3a4b8db995ec4b211f28a1119bf10ca (patch) | |
tree | 31cf11f9364a0890bf7ab74bc500ecc21e63b100 /chardev/testdev.c | |
parent | 380822edb3252962001a47c02facb7c7e977dc7d (diff) | |
download | qemu-2c398ee5e3a4b8db995ec4b211f28a1119bf10ca.zip qemu-2c398ee5e3a4b8db995ec4b211f28a1119bf10ca.tar.gz qemu-2c398ee5e3a4b8db995ec4b211f28a1119bf10ca.tar.bz2 |
tests/qtest/hd-geo-test: Fix checks on mkstemp() return value
Coverity notices that the checks against mkstemp() failing in
create_qcow2_with_mbr() are wrong: mkstemp returns -1 on failure but
the check is just "g_assert(fd)". Fix to use "g_assert(fd >= 0)",
matching the correct check in create_test_img().
Fixes: Coverity CID 1432274
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20210525134458.6675-4-peter.maydell@linaro.org
Diffstat (limited to 'chardev/testdev.c')
0 files changed, 0 insertions, 0 deletions