[Libevent-users] [PATCH] Do not call gettime in timeout_process if the timetree is empty

Nick Mathewson nickm at freehaven.net
Thu Sep 20 14:26:58 EDT 2007


On Thu, Sep 20, 2007 at 03:14:51PM +0200, Trond Norbye wrote:
 [...]
> >
> >Why not just return if RB_EMPTY() is true rather than adding another level
> >of indention? 
> Some people (I'm not one of them) dislikes multiple return statements 
> from a function, so I just added the extra level to avoid annoying them ;-)

I'm not one of those people, so I'm rewriting your patch to a simple
"if (RB_EMPTY(&base->timetree)) return;" and checking it in. ;)

yrs,
-- 
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070920/bd84850e/attachment.bin


More information about the Libevent-users mailing list