$OpenBSD: patch-kdecore_tests_kfiltertest_cpp,v 1.1 2013/12/08 19:13:32 zhuk Exp $
More correct implementation of random() & Co., using arc4random().
--- kdecore/tests/kfiltertest.cpp.orig	Sun Aug  4 21:59:28 2013
+++ kdecore/tests/kfiltertest.cpp	Sun Aug  4 22:00:04 2013
@@ -92,7 +92,7 @@ void KFilterTest::test_biggerWrites()
     data.reserve(10000);
     // Prepare test data
     for (int i = 0; i < 8170; ++i)
-        data.append((char)(KRandom::random() % 256));
+        data.append((char)(KRandom::uniform(256)));
     QCOMPARE(data.size(), 8170);
     // 8170 random bytes compress to 8194 bytes due to the gzip header/footer.
     // Now we can go one by one until we pass 8192.
@@ -106,7 +106,7 @@ void KFilterTest::test_biggerWrites()
         test_readall(outFile, QString::fromLatin1("application/x-gzip"), data);
 
 
-        data.append((char)(KRandom::random() % 256));
+        data.append((char)(KRandom::uniform(256)));
     }
 }
 
