Re: [PATCH 1/5] select: add a timespec version of the timeout to select/poll

Andrew Morton
2008-08-30T02:11:27Z

On Fri, 29 Aug 2008 08:06:30 -0700 Arjan van de Ven <arjan@infradead.org> wrote:

> + memset(&end_time, 0, sizeof(end_time));

It's a bit dorkward using memset to clear out a structure which
zillions of code sites already know contains only two members.

It could be that two plain old writes is more efficient. (and it could
be that this is how the compiler implements the memset anyway?)

But I'd suggest that adding a new inlined timespec_zero(timespec*) or
timespec_set(timespec*,int,int) would be nicer.