Re: [PATCH v5 01/35] pkt-line: introduce packet_read_with_status

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

 



Brandon Williams <bmwill@xxxxxxxxxx> writes:

>> EOF was -1 and NORMAL was 0 in the previous round; do we need to
>> read through all the invocations of functions that return this type
>> and make sure there is no "while (such_a_function())" that used to see
>> if we read NORMAL that is left un-updated?
>>  ...
>> Will replace.  Thanks.
>
> A reviewer in the previous round found that it was unnecessary to have
> EOF start at -1, so per their comments I got rid of that.

Yes, I am aware of that exchange, and after vetting the callers I
think it is "unnecessary" for EOF to be negative and NORMAL to be 0
with the current code (iow, any value can be used for these enums as
long as they are distinct).

But that is different matter.  If having negative EOF and/or zero
NORMAL helps readability of the resulting code, then even if it is
not "necessary" for EOF to be negative, it would still be "better".




[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