no need to alloc it, just append it.

2014-04-09 11:06 GMT+02:00 Marcel Hollerbach <marcel.hollerb...@stzedn.de>:

> bu5hm4n pushed a commit to branch master.
>
>
> http://git.enlightenment.org/misc/entrance.git/commit/?id=fd8c7b75b5ab92b305f35ee8f77ae8a373a1b8e6
>
> commit fd8c7b75b5ab92b305f35ee8f77ae8a373a1b8e6
> Author: Marcel Hollerbach <marcel.hollerb...@stzedn.de>
> Date:   Wed Apr 9 11:06:01 2014 +0200
>
>     entrance: append the user in the history if there was an update
> ---
>  src/daemon/entrance_history.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/daemon/entrance_history.c b/src/daemon/entrance_history.c
> index 678af57..12371fe 100644
> --- a/src/daemon/entrance_history.c
> +++ b/src/daemon/entrance_history.c
> @@ -162,7 +162,7 @@ void
>  entrance_history_user_update(const Entrance_Login *eu)
>  {
>     Eina_List *l;
> -   Entrance_Login *el;
> +   Entrance_Login *el, *eln;
>
>     PT("Updating user info\n");
>
> @@ -182,7 +182,10 @@ entrance_history_user_update(const Entrance_Login *eu)
>               if (!strcmp(eu->login, el->login))
>                 {
>                    PT("Append user in history\n");
> -                  _entrance_history_user_set(el, eu);
> +                  eln = calloc(1, sizeof(Entrance_Login));
> +                  memcpy(eln, el, sizeof(Entrance_Login));
> +                  _entrance_history_user_set(eln, eu);
> +                  _entrance_history->history =
> eina_list_append(_entrance_history->history, eln);
>                    break;
>                 }
>            }
>
> --
>
>
>


-- 
Michaël Bouchaud (yoz) <y...@efl.so>
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to