summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-fec/lib/reed-solomon/exercise.c8
-rw-r--r--gr-fec/lib/reed-solomon/rstest.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/gr-fec/lib/reed-solomon/exercise.c b/gr-fec/lib/reed-solomon/exercise.c
index de33a6bff3..41ed4f2148 100644
--- a/gr-fec/lib/reed-solomon/exercise.c
+++ b/gr-fec/lib/reed-solomon/exercise.c
@@ -70,7 +70,7 @@ int trials){
/* Load block with random data and encode */
for(i=0;i<NN-NROOTS;i++)
- block[i] = random() & NN;
+ block[i] = rand() & NN;
#if defined(CCSDS) || defined(FIXED)
ENCODE_RS(&block[0],&block[NN-NROOTS]);
@@ -85,17 +85,17 @@ int trials){
erasures=0;
for(i=0;i<(unsigned int)errors;i++){
do {
- errval = random() & NN;
+ errval = rand() & NN;
} while(errval == 0); /* Error value must be nonzero */
do {
- errloc = random() % NN;
+ errloc = rand() % NN;
} while(errlocs[errloc] != 0); /* Must not choose the same location twice */
errlocs[errloc] = 1;
#if FLAG_ERASURE
- if(random() & 1) /* 50-50 chance */
+ if(rand() & 1) /* 50-50 chance */
derrlocs[erasures++] = errloc;
#endif
tblock[errloc] ^= errval;
diff --git a/gr-fec/lib/reed-solomon/rstest.c b/gr-fec/lib/reed-solomon/rstest.c
index 767c01d848..e2783843e9 100644
--- a/gr-fec/lib/reed-solomon/rstest.c
+++ b/gr-fec/lib/reed-solomon/rstest.c
@@ -57,7 +57,7 @@ int main(){
int i;
terrs = 0;
- srandom(time(NULL));
+ srand(time(NULL));
#ifdef ALL_VERSIONS
printf("Testing fixed (255,223) RS codec...");