qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/6] tests/qtest/hd-geo-test: Fix checks on mkstemp() return


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/6] tests/qtest/hd-geo-test: Fix checks on mkstemp() return value
Date: Tue, 25 May 2021 15:59:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

On 5/25/21 3:44 PM, Peter Maydell wrote:
> 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>
> ---
>  tests/qtest/hd-geo-test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]