Re: another patch in #for-linus (was Re: [RFC] a corner case of open(2))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux