]> pd.if.org Git - pdclib.old/blobdiff - functions/stdlib/rand.c
Porting current working set from CVS.
[pdclib.old] / functions / stdlib / rand.c
index 1ad3e915d76ff0e971810c008a719ad8d8da553c..b326be00493615731ba5ecb7ba5d62170b7af3cc 100644 (file)
@@ -2,7 +2,7 @@
 
 /* Release $Name$ */
 
-/* rand()
+/* rand( void )
 
    This file is part of the Public Domain C Library (PDCLib).
    Permission is granted to use, modify, and / or redistribute at will.
@@ -12,7 +12,7 @@
 
 #ifndef REGTEST
 
-int rand()
+int rand( void )
 {
     _PDCLIB_seed = _PDCLIB_seed * 1103515245 + 12345;
     return (unsigned int) ( _PDCLIB_seed / 65536 ) % 32768;
@@ -23,10 +23,9 @@ int rand()
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
-int main()
+int main( void )
 {
     int rnd1, rnd2;
-    BEGIN_TESTS;
     TESTCASE( ( rnd1 = rand() ) < RAND_MAX );
     TESTCASE( ( rnd2 = rand() ) < RAND_MAX );
     srand( 1 );