This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #16996] get_nprocs: Only return explictly set cache values


On 06/12/2014 12:15 PM, Siddhesh Poyarekar wrote:

> Wouldn't (now == prev && now > 0) be nicer?

Hmmm, good point, but is it OK to make assumptions about the underlying
representation of 'time_t'* (e.g. that we get the expected behavior from the > 0
compare)?  The 'now == prev' compare is at least 'time_t'-to-'time_t'.  I
thought about just doing 'cached_result > 0' too, but I suppose 'cached_result'
can actually be 0 in the case of an error.

* The C Standard generally says not to, but maybe we can make that assumption
within the implementation of the C Standard Library.

-- 
Meador Inge
CodeSourcery / Mentor Embedded


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]