Fix: unitialized variables in tests
authorJulien Desfossez <jdesfossez@efficios.com>
Tue, 12 Nov 2013 22:41:21 +0000 (17:41 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 13 Nov 2013 18:40:39 +0000 (13:40 -0500)
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 <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/regression/tools/live/live_test.c

index b2935e155b0ed62c8504e94d0d8fcb3c549cc7dd..2482e50048610aa8b4c2ee45da5b939e24232993 100644 (file)
@@ -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);
 
This page took 0.033352 seconds and 4 git commands to generate.