summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm_radio_priv_emulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mm_radio_priv_emulator.c b/src/mm_radio_priv_emulator.c
index c5239c2..4b685f4 100644
--- a/src/mm_radio_priv_emulator.c
+++ b/src/mm_radio_priv_emulator.c
@@ -875,8 +875,8 @@ int _mm_radio_get_signal_strength(mm_radio_t * radio, int *value)
return MM_ERROR_NONE;
}
- srand((unsigned)time(NULL));
- *value = 0 - ((rand() % 20 + 1) + 80);
+ unsigned int seed = (unsigned)time(NULL);
+ *value = 0 - ((rand_r(&seed) % 20 + 1) + 80);
MMRADIO_LOG_FLEAVE();
return MM_ERROR_NONE;
}