bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/misc/entrance.git/commit/?id=897707e44501bdd82ddb8ba3a3fe837f8f6f067a

commit 897707e44501bdd82ddb8ba3a3fe837f8f6f067a
Author: Marcel Hollerbach <marcel.hollerb...@stzedn.de>
Date:   Thu Mar 6 17:28:04 2014 +0100

    entrance: warn --, forgot srand ..., freed the wrong list !
---
 src/bin/entrance_gui.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/entrance_gui.c b/src/bin/entrance_gui.c
index 66ab019..ba1990e 100755
--- a/src/bin/entrance_gui.c
+++ b/src/bin/entrance_gui.c
@@ -208,7 +208,7 @@ entrance_gui_shutdown(void)
        eina_stringshare_del(img->group);
        free(img);
      }
-   EINA_LIST_FREE(_gui->theme_icon_pool, img)
+   EINA_LIST_FREE(_gui->theme_background_pool, img)
      {
        eina_stringshare_del(img->path);
        eina_stringshare_del(img->group);
@@ -626,7 +626,6 @@ _entrance_gui_user_icon_random_get(Evas_Object *obj, const 
char *username)
 {
    unsigned int rnd = 0;
    Evas_Object *o = NULL;
-   char buf[PATH_MAX], *path;
    Entrance_Image *img;
    const Entrance_Login *el;
    Eina_List *user_icons, *sys_icons, *theme_icons;
@@ -636,6 +635,7 @@ _entrance_gui_user_icon_random_get(Evas_Object *obj, const 
char *username)
    sys_icons = entrance_gui_icon_pool_get();
    theme_icons = entrance_gui_theme_icons();
 
+   srand(time(NULL));
    rnd = (((eina_list_count(user_icons) + eina_list_count(sys_icons) + 
eina_list_count(theme_icons))
          * (double)rand()) / (RAND_MAX + 1.0));
    if (rnd < eina_list_count(user_icons))

-- 


Reply via email to