]> git.proxmox.com Git - mirror_qemu.git/commit
tests: Avoid side effects inside g_assert() arguments
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 3 May 2021 16:55:25 +0000 (17:55 +0100)
committerThomas Huth <thuth@redhat.com>
Fri, 14 May 2021 10:28:01 +0000 (12:28 +0200)
commitbfaa3b05a9af6acd011e772fa42eff5d05424a35
treebabd43bf1e0b4568663047d7af42807c647b0099
parent6c054176dba1c3669f7dbf0f3b6bf9e7245a0dfe
tests: Avoid side effects inside g_assert() arguments

For us, assertions are always enabled, but side-effect expressions
inside the argument to g_assert() are bad style anyway. Fix three
occurrences in IPMI related tests, which will silence some Coverity
nits.

Fixes: CID 1432322, CID 1432287, CID 1432291
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210503165525.26221-4-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/ipmi-bt-test.c
tests/qtest/ipmi-kcs-test.c