On 26/01/15 17:24, Daniel Kolesa wrote:
> q66 pushed a commit to branch master.
>
> http://git.enlightenment.org/enlightenment/modules/tclock.git/commit/?id=5388680581b36b9072a08446ad4e015c282c528e
>
> commit 5388680581b36b9072a08446ad4e015c282c528e
> Author: Daniel Kolesa <d.kol...@samsung.com>
> Date:   Mon Jan 26 17:24:03 2015 +0000
>
>      use eina_stringshare_ref instead of eina_stringshare_add
> ---
>   src/e_mod_config.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/e_mod_config.c b/src/e_mod_config.c
> index 9272af9..3a1bbf8 100644
> --- a/src/e_mod_config.c
> +++ b/src/e_mod_config.c
> @@ -51,9 +51,9 @@ _fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata)
>      cfdata->show_time = ci->show_time;
>      cfdata->show_date = ci->show_date;
>      cfdata->show_tip = ci->show_tip;
> -   if (ci->time_format) cfdata->time_format = 
> eina_stringshare_add(ci->time_format);
> -   if (ci->date_format) cfdata->date_format = 
> eina_stringshare_add(ci->date_format);
> -   if (ci->tip_format) cfdata->tip_format = 
> eina_stringshare_add(ci->tip_format);
> +   if (ci->time_format) cfdata->time_format = 
> eina_stringshare_ref(ci->time_format);
> +   if (ci->date_format) cfdata->date_format = 
> eina_stringshare_ref(ci->date_format);
> +   if (ci->tip_format) cfdata->tip_format = 
> eina_stringshare_ref(ci->tip_format);
>   }
>
>   static void *
>

It's fine to stringshare_ref NULL... No need to test it (unless you are 
doing it on purpose, i.e you don't want to override when NULL).

--
Tom.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to