1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

tests: Assert if ssh_get_random failed in torture_rand_thread.

Found by clang-analyzer http://test.libssh.org/clang-analyzer/
This commit is contained in:
Andreas Schneider
2011-01-06 10:13:06 +01:00
parent dfa01d0862
commit 184f1e1706

View File

@ -36,6 +36,7 @@ static void *torture_rand_thread(void *threadid) {
buffer[0] = buffer[1] = buffer[10] = buffer[11] = 'X';
for(i = 0; i < NUM_LOOPS; ++i) {
r = ssh_get_random(&buffer[2], i % 8 + 1, 0);
assert_true(r == 1);
}
pthread_exit(NULL);