lkml.org 
[lkml]   [2016]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: another patch in #for-linus (was Re: [RFC] a corner case of open(2))
Hi!


> +unsigned long iov_iter_gap_alignment(const struct iov_iter *i)
> +{
> + unsigned long res = 0;
> + size_t size = i->count;

Something is wrong with indentation here.

> + iterate_all_kinds(i, size, v,
> + (res |= (!res ? 0 : (unsigned long)v.iov_base) |
> + (size != v.iov_len ? size : 0), 0),
> + (res |= (!res ? 0 : (unsigned long)v.bv_offset) |
> + (size != v.bv_len ? size : 0)),
> + (res |= (!res ? 0 : (unsigned long)v.iov_base) |
> + (size != v.iov_len ? size : 0))
> + );

Umm. Come on. What's that? Obfuscated C code contest? Could the logic
at least be modified to (res ? ... : 0)?

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

\
 
 \ /
  Last update: 2016-05-03 00:01    [W:0.055 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site