Fixed Svace issue(WGID:31189) 30/61630/2 accepted/tizen_tv accepted/tizen/common/20160311.201254 accepted/tizen/ivi/20160311.055000 accepted/tizen/mobile/20160311.054859 accepted/tizen/tv/20160311.054916 accepted/tizen/wearable/20160311.054938 submit/tizen/20160310.063535
authorGilbok Lee <gilbok.lee@samsung.com>
Wed, 9 Mar 2016 08:39:14 +0000 (17:39 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 10 Mar 2016 02:54:44 +0000 (11:54 +0900)
Change-Id: I31c15d9eee50fc411b8728b43007ffe16f402eb0
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
src/mm_radio_priv_emulator.c

index c5239c2..4b685f4 100644 (file)
@@ -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;
 }