diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-10-03 20:46:50 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-10-03 20:46:50 +0100 |
commit | 42c123d1d7b4b5fa1251b3ae7768912f480d36a3 (patch) | |
tree | 50d320ae44fde2d6d547cf4e74a547c7ae8c33b0 /src/examples | |
parent | de5ac3287002f21fb13f97ba635f6962664e3ebc (diff) | |
download | efl-42c123d1d7b4b5fa1251b3ae7768912f480d36a3.tar.gz |
singularize srand in eina_init - only once in one place
simplify down to having a single srand() in eina_init and use urandom
if it works and is there - if not, time(NULL) will do. it's the best
we can...
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/ecore/ecore_evas_cursor_example.c | 1 | ||||
-rw-r--r-- | src/examples/eina/eina_value_02.c | 1 | ||||
-rw-r--r-- | src/examples/elementary/gengrid_example.c | 2 | ||||
-rw-r--r-- | src/examples/evas/evas-box.c | 2 | ||||
-rw-r--r-- | src/examples/evas/evas-images2.c | 2 | ||||
-rw-r--r-- | src/examples/evas/evas-smart-interface.c | 2 | ||||
-rw-r--r-- | src/examples/evas/evas-smart-object.c | 2 |
7 files changed, 0 insertions, 12 deletions
diff --git a/src/examples/ecore/ecore_evas_cursor_example.c b/src/examples/ecore/ecore_evas_cursor_example.c index cbf7dfc32d..953a5cfd78 100644 --- a/src/examples/ecore/ecore_evas_cursor_example.c +++ b/src/examples/ecore/ecore_evas_cursor_example.c @@ -154,7 +154,6 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED) Ecore_Timer *t; const char *driver; - srand(time(NULL)); if (!ecore_evas_init()) { fprintf(stderr, "Could not init the Ecore Evas\n"); diff --git a/src/examples/eina/eina_value_02.c b/src/examples/eina/eina_value_02.c index a8119bdc87..cb28bf4914 100644 --- a/src/examples/eina/eina_value_02.c +++ b/src/examples/eina/eina_value_02.c @@ -85,7 +85,6 @@ int main(int argc, char **argv) eina_init(); value_init(); - srand(time(NULL)); v1 = eina_value_struct_new(V1_DESC); v2 = eina_value_struct_new(V2_DESC); diff --git a/src/examples/elementary/gengrid_example.c b/src/examples/elementary/gengrid_example.c index b342f6c60e..37f2805ee5 100644 --- a/src/examples/elementary/gengrid_example.c +++ b/src/examples/elementary/gengrid_example.c @@ -418,8 +418,6 @@ elm_main(int argc EINA_UNUSED, Eina_Bool bounce; double h, v; - srand(time(NULL)); - elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); elm_app_info_set(elm_main, "elementary", "images"); diff --git a/src/examples/evas/evas-box.c b/src/examples/evas/evas-box.c index 255b11609f..d42456f984 100644 --- a/src/examples/evas/evas-box.c +++ b/src/examples/evas/evas-box.c @@ -317,8 +317,6 @@ main(void) Evas_Object *last, *o; int i; - srand(time(NULL)); - if (!ecore_evas_init()) return EXIT_FAILURE; diff --git a/src/examples/evas/evas-images2.c b/src/examples/evas/evas-images2.c index 74ac3f0e8d..30477ba02d 100644 --- a/src/examples/evas/evas-images2.c +++ b/src/examples/evas/evas-images2.c @@ -226,8 +226,6 @@ main(void) unsigned int pixels[(WIDTH / 4) * (HEIGHT / 4)]; Evas_Textblock_Style *st; - srand(time(NULL)); - if (!ecore_evas_init()) return EXIT_FAILURE; diff --git a/src/examples/evas/evas-smart-interface.c b/src/examples/evas/evas-smart-interface.c index 2d42952598..f3019e4110 100644 --- a/src/examples/evas/evas-smart-interface.c +++ b/src/examples/evas/evas-smart-interface.c @@ -678,8 +678,6 @@ main(void) unsigned int count; Eina_Bool ret; - srand(time(NULL)); - if (!ecore_evas_init()) return EXIT_FAILURE; diff --git a/src/examples/evas/evas-smart-object.c b/src/examples/evas/evas-smart-object.c index c0988e5029..7809f4f4b6 100644 --- a/src/examples/evas/evas-smart-object.c +++ b/src/examples/evas/evas-smart-object.c @@ -648,8 +648,6 @@ main(void) unsigned int count; Eina_Bool ret; - srand(time(NULL)); - if (!ecore_evas_init()) return EXIT_FAILURE; |