lkml.org 
[lkml]   [2001]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Patch to improve readability of sock_rcvlowat() - comments wanted...
Ronald Bultje wrote:

> On 2001.05.08 01:04:57 +0200 Jesper Juhl wrote:
>
>> static inline int sock_rcvlowat(struct sock *sk, int waitall, int len)
>> {
>> int r = len;
>> if (!waitall)
>> r = min(sk->rcvlowat, len);
>> return max(1,r);
>> }
>>
>
>
> return max(1, waitall ? len : min(sk->rcvlowat, len));
>
> Although I doubt this is more readable... :-)
>

IMO your version is less readable than the 4-liner above, and the code
it generates is a lot bigger than both the original and the proposed
replacement - but thank you for the suggestion...

- Jesper Juhl - juhl@eisenstein.dk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.047 / U:7.332 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site