Re: [PATCH v2] parse-options.c: use "enum parse_opt_result" for parse_nodash_opt()

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

 



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

> Change the parse_nodash_opt() function to use "enum
> parse_opt_result".In 352e761388b (parse-options.[ch]: consistently

s/.In/. In/; no need to resend for this.

> use "enum parse_opt_result", 2021-10-08) its only caller
> parse_options_step() started using that return type, and the
> get_value() which will be called and return from it uses the same
> enum.
> ...
> Since we only care about whether the return value here is non-zero
> let's use the more generic PARSE_OPT_ERROR.

I do not see a reason why anybody may think that it is a sensible
thing for "this returns a value from an enum, not int, so make it
so" patch, which is not supposed to change the sematics, to do,
though.  It is even so since we know the current caller does not
care.  The need of the next caller may tell us what the reasonable
return value should be, but we do not know well enough to justify
changing the value.







[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