]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/sg_random.c
Fix a potential array under/over run bug.
[simgear.git] / simgear / math / sg_random.c
index dcabf119cc1b5f66aeb5c39a170e4545d8bf90e2..f67f1341d37f8fe3862eb2e7084ba37dd89eda08 100644 (file)
@@ -23,7 +23,7 @@
 
 
 #ifdef HAVE_CONFIG_H
-#  include <config.h>
+#  include <simgear_config.h>
 #endif
 
 #include <stdio.h>
@@ -41,7 +41,7 @@
 
 #ifdef __SUNPRO_CC
     extern "C" {
-       long int random(void);
+       long int random();
        void srandom(unsigned int seed);
     }
 #endif
@@ -49,7 +49,7 @@
 
 // Seed the random number generater with time() so we don't see the
 // same sequence every time
-void sg_srandom_time(void) {
+void sg_srandom_time() {
 #ifdef HAVE_RAND
     srand(time(NULL));
 #else
@@ -70,7 +70,7 @@ void sg_srandom( unsigned int seed ) {
 
 
 // return a random number between [0.0, 1.0)
-double sg_random(void) {
+double sg_random() {
 #ifdef HAVE_RAND
     return(rand() / (double)RAND_MAX);
 #else