diff options
author | Andreas Schneider <asn@cynapses.org> | 2011-01-06 10:13:06 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cynapses.org> | 2011-01-06 10:15:01 +0100 |
commit | 184f1e17068a369ae030c9cdbe0e9ac3f6de286b (patch) | |
tree | 0c67354b71f4a7049f8b99f31d8ae51e3b382b9a /tests | |
parent | dfa01d086287abe5eba8811697f2326b8a785fe0 (diff) | |
download | libssh-184f1e17068a369ae030c9cdbe0e9ac3f6de286b.tar.gz libssh-184f1e17068a369ae030c9cdbe0e9ac3f6de286b.tar.xz libssh-184f1e17068a369ae030c9cdbe0e9ac3f6de286b.zip |
tests: Assert if ssh_get_random failed in torture_rand_thread.
Found by clang-analyzer http://test.libssh.org/clang-analyzer/
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/torture_rand.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unittests/torture_rand.c b/tests/unittests/torture_rand.c index 71e8bf18..829989b0 100644 --- a/tests/unittests/torture_rand.c +++ b/tests/unittests/torture_rand.c @@ -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); |