Code cleanup

This commit is contained in:
Pierre Pronchery 2014-03-29 21:30:19 +01:00
parent fdbc0f891c
commit e030d8a9a1

View File

@ -1356,10 +1356,8 @@ static char const * _insert_date(time_t date)
sixmonths = time(NULL) - 15552000;
localtime_r(&date, &tm);
if(date < sixmonths)
len = strftime(buf, sizeof(buf), "%b %e %Y", &tm);
else
len = strftime(buf, sizeof(buf), "%b %e %H:%M", &tm);
len = strftime(buf, sizeof(buf), (date < sixmonths)
? "%b %e %H:%M" : "%b %e %Y", &tm);
buf[len] = '\0';
return buf;
}