1234567891011121314151617181920212223242526 |
- $OpenBSD: patch-testcode_testreader_cpp,v 1.2 2016/05/27 22:50:31 sthen Exp $
- --- testcode/testreader.cpp.orig Sun Jan 17 03:58:21 2016
- +++ testcode/testreader.cpp Fri May 27 17:53:20 2016
- @@ -128,7 +128,9 @@ HRESULT CTestReader::Test2()
- Chk(TestFixedReadSizes(chunksize));
- }
-
- +#ifndef HAVE_ARC4RANDOM
- srand(888);
- +#endif
- for (size_t i = 0; i < 200; i++)
- {
- Chk(TestFixedReadSizes(0));
- @@ -156,7 +158,11 @@ HRESULT CTestReader::TestFixedReadSizes(size_t chunksi
-
- if (fRandomChunkSizing)
- {
- +#ifdef HAVE_ARC4RANDOM
- + chunksize = arc4random_uniform(17) + 1;
- +#else
- chunksize = (rand() % 17) + 1;
- +#endif
- }
-
- remaining = msgSize - bytesread;
|