aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/ipmi-bt-test.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-08-13 16:05:05 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-08-26 17:02:00 +0100
commita8ca0033c25939d609c1bab12f6b8402ff719552 (patch)
tree5d9fbbc2488e33d0e58b70c33a033c546e0a4bec /tests/qtest/ipmi-bt-test.c
parentfdcdf54d1e93792c66e7566cec4638786990174e (diff)
downloadqemu-a8ca0033c25939d609c1bab12f6b8402ff719552.zip
qemu-a8ca0033c25939d609c1bab12f6b8402ff719552.tar.gz
qemu-a8ca0033c25939d609c1bab12f6b8402ff719552.tar.bz2
tests/qtest/ipmi-bt-test: Zero-initialize sockaddr struct
Zero-initialize the sockaddr_in struct that we're about to fill in and pass to bind(), to ensure we don't leave possible implementation-defined extension fields as uninitialized garbage. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Corey Minyard <cminyard@mvista.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-id: 20210813150506.7768-4-peter.maydell@linaro.org
Diffstat (limited to 'tests/qtest/ipmi-bt-test.c')
-rw-r--r--tests/qtest/ipmi-bt-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qtest/ipmi-bt-test.c b/tests/qtest/ipmi-bt-test.c
index 8492f02..19612e9 100644
--- a/tests/qtest/ipmi-bt-test.c
+++ b/tests/qtest/ipmi-bt-test.c
@@ -378,7 +378,7 @@ static void test_enable_irq(void)
*/
static void open_socket(void)
{
- struct sockaddr_in myaddr;
+ struct sockaddr_in myaddr = {};
socklen_t addrlen;
myaddr.sin_family = AF_INET;