|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/5] xen/console: Traditional console timestamps including milliseconds
On 03/06/14 19:41, Andrew Cooper wrote: On 06/03/2014 23:54, Don Slutz wrote:On 03/06/14 14:28, Andrew Cooper wrote:
This is not 100% true. Last I knew (struct tm) { 0 } is
struct tm {
int tm_sec; /* seconds */ = 0
int tm_min; /* minutes */ <undef>
int tm_hour; /* hours */ <undef>
int tm_mday; /* day of the month */ <undef>
int tm_mon; /* month */ <undef>
int tm_year; /* year */ <undef>
int tm_wday; /* day of the week */ <undef>
int tm_yday; /* day in the year */ <undef>
int tm_isdst; /* daylight saving time */ <undef>
};
But not having looked at the code, and the compilers could have changed
what this means (i.e. if not provided they are zero in which case this
should be {}. { 0, 0, 0, 0 } or { .tm_mday = 0 } is the way I know of
to say "tm_mday" is zero).
So the test for tm.tm_mday == 0 may just be working because the undefined value is zero... While it is not exactly a hot codepath, unconditionally clearing it seems silly, especially as it is not exactly the most likely candidate to get a new caller in the near future. There is no clear right answer here. So I have no issue with not doing the "extra" work. -Don Slutz ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |