Re: [PATCH 10/10] parse-options: change OPT_{SHORT,UNSET} to an enum

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> Change the comparisons against OPT_SHORT and OPT_UNSET to an enum
> which keeps track of how a given option got parsed. The case of "0"
> was an implicit OPT_LONG, so let's add an explicit label for it.

I think this is going backwards.  If we want to change anything in
this area, you may

 (1) spell the values not as 1 and 2 but as bit-shifts (1U<<0),
     (1U<<1), and

 (2) turn "flags" into "unsigned".

but I do not think of a reason why it would be a good move to use
enum for "these are bits", for the same reason as my comments on
[2/10].

Thanks.




[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