Re: [PATCH 11/16] zuf: Write/Read implementation

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

 



On 29/10/2019 22:15, Matthew Wilcox wrote:
> On Tue, Oct 29, 2019 at 08:08:16PM +0000, Schumaker, Anna wrote:
>>> +       return size ?: ret;
>>
>> It looks like you're returning "ret" if the ternary evaluates to false, but it's not clear to
>> me what is returned if it evaluates to true. It's possible it's okay, but I just don't know
>> enough about how ternaries work in this case.
> 
> It's an unloved, unwnted GNU extension.  See
> https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html
> 
> It's really no better than writing:
> 
> 	return size ? size : ret;
> 
> or even better:
> 
> 	if (size)
> 		return size;
> 	return ret;
> 

OK Cool thanks will do
Boaz



[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