Fix: unitialized variables in tests
[lttng-tools.git] / 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;
 
        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);
        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;
 
        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);
 
        rq.session_id = htobe64(id);
        rq.seek = htobe32(VIEWER_SEEK_BEGINNING);
 
This page took 0.022866 seconds and 4 git commands to generate.