]> git.draconx.ca Git - cdecl99.git/commit
cdecl99: Avoid passing uninitialized value to help_print_option.
authorNick Bowler <nbowler@draconx.ca>
Fri, 16 Jun 2023 04:34:41 +0000 (00:34 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 16 Jun 2023 04:34:41 +0000 (00:34 -0400)
commita0976f87118cc8d9ccc7a79f2ef29935798284e1
tree30b352d403d3fae3e4d006a9a5dad4b4f5595128
parentd994d4c8bc35514ab5fafff7177cdf6d4e3c61ce
cdecl99: Avoid passing uninitialized value to help_print_option.

For options that do not take arguments, the "arg" member of the help
structure is not assigned by lopt_get_help.  Since the structure
is not otherwise initialized, it is technically undefined to even
evaluate this member in order to pass it to the help_print_option
function.

In this case, the argument is not actually used, and I'm not aware
of any actual failures as a result, but it easy enough to avoid.
src/cdecl99.c