Change-Id: I4d6f046cdd0a57c233ca4cd6548a7d7e98950498
gettimeofday(&timev, NULL);
tt = (time_t)(timev.tv_sec);
tzset();
- tm = localtime(&tt);
+ tm = calloc(1, sizeof(struct tm));
+ if (!tm) return;
+ localtime_r(&tt, tm);
wd->timediff = (((wd->hrs - tm->tm_hour) * 60 +
wd->min - tm->tm_min) * 60) + wd->sec - tm->tm_sec;
+ free(tm);
}
static Eina_Bool
{
tt = (time_t)(timev.tv_sec) + wd->timediff;
tzset();
- tm = localtime(&tt);
- if (tm)
- {
- wd->hrs = tm->tm_hour;
- wd->min = tm->tm_min;
- wd->sec = tm->tm_sec;
- _time_update(data);
- }
+ tm = calloc(1, sizeof(struct tm));
+ if (!tm) return ECORE_CALLBACK_CANCEL;
+ localtime_r(&tt, tm);
+ wd->hrs = tm->tm_hour;
+ wd->min = tm->tm_min;
+ wd->sec = tm->tm_sec;
+ _time_update(data);
+
+ free(tm);
}
return ECORE_CALLBACK_CANCEL;
}
if (it)
{
eina_stringshare_del(it->label);
- evas_object_del(VIEW(wd->first));
+ evas_object_del(VIEW(it));
free(it);
}
}
if (it)
{
eina_stringshare_del(it->label);
- evas_object_del(VIEW(wd->first));
+ evas_object_del(VIEW(it));
free(it);
}
}