From dcf5c25ef672792f4a3ec21048f7241dc6afc4b0 Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Tue, 12 Nov 2013 17:41:21 -0500 Subject: [PATCH] Fix: unitialized variables in tests Some fields in the structures were not set before being sent. It was OK in this context because it was useless parameters, but Coverity complained. Fixes Coverity 1127092 and 1127091 Signed-off-by: Julien Desfossez Signed-off-by: David Goulet --- tests/regression/tools/live/live_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/regression/tools/live/live_test.c b/tests/regression/tools/live/live_test.c index b2935e155..2482e5004 100644 --- a/tests/regression/tools/live/live_test.c +++ b/tests/regression/tools/live/live_test.c @@ -129,6 +129,7 @@ int establish_connection(void) cmd.data_size = sizeof(connect); cmd.cmd_version = 0; + memset(&connect, 0, sizeof(connect)); connect.major = htobe32(VERSION_MAJOR); connect.minor = htobe32(VERSION_MINOR); connect.type = htobe32(VIEWER_CLIENT_COMMAND); @@ -230,6 +231,7 @@ int attach_session(int id) cmd.data_size = sizeof(rq); cmd.cmd_version = 0; + memset(&rq, 0, sizeof(rq)); rq.session_id = htobe64(id); rq.seek = htobe32(VIEWER_SEEK_BEGINNING); -- 2.34.1