lkml.org 
[lkml]   [2008]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] select: add a timespec version of the timeout to select/poll
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.



\
 
 \ /
  Last update: 2008-08-30 04:13    [W:0.062 / U:5.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site