#endif
gethostname(host, sizeof(host)-1);
- memset(&tm, 0, sizeof(tm));
if (strchr(srcemail, '@'))
ast_copy_string(who, srcemail, sizeof(who));
struct ast_tm tm;
struct timeval t = ast_tvnow();
- memset(&tm, 0, sizeof(tm));
ast_localtime(&t, &tm, NULL);
return ast_strftime(s, len, "%a %b %e %r %Z %Y", &tm);
struct ast_tm *ast_localtime(const struct timeval *timep, struct ast_tm *tmp, const char *zone)
{
const struct state *sp = ast_tzset(zone);
+ memset(tmp, 0, sizeof(*tmp));
return sp ? localsub(timep, 0L, tmp, sp) : NULL;
}