Re: [PATCH RFC 01/24] ref-filter: get rid of goto

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

 



Оля Тележная  <olyatelezhnaya@xxxxxxxxx> writes:

>> one place improves readability.  If better readability is the
>> purpose, I would even say
>>
>>          for (i = 0; i < used_atom_cnt; i++) {
>>                 if (...)
>> -                       goto need_obj;
>> +                       break;
>>         }
>> -       return;
>> +       if (used_atom_cnt <= i)
>>                 return;
>>
>> -need_obj:
>>
>> would make the result easier to follow with a much less impact.
>
> It's hard for me to read the code with goto, and as I know, it's not
> only my problem,...

That sounds as if you are complaining "I wanted to get rid of goto
and you tell me not to do so???", but read what I showed above again
and notice that it is also getting rid of "goto".

The main difference from your version is that the original function
is still kept as a single unit of work, instead of two.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux