]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
argconfig: Do not use default value loading by getopt_long_only
authorDaniel Wagner <dwagner@suse.de>
Mon, 28 Mar 2022 18:24:21 +0000 (20:24 +0200)
committerDaniel Wagner <dwagner@suse.de>
Tue, 29 Mar 2022 11:05:25 +0000 (13:05 +0200)
commit0fc6df53e123892abf3ce996a43a3a482acdfdcf
tree24613630a6ea66f6260d8468606d871df44806f7
parent6881c7ad10a4bd90fe36657827ee0b25ed5789f6
argconfig: Do not use default value loading by getopt_long_only

getopt_long_only() is able to load the default values directly. Though
the type has to be 'int'. If the target type of argument not 'int'
getopt_long_only will overwrite adjacent memory location.

Reduce the complexity by not using this feature.

Instead use the type bool because libnvme uses bool in 'struct
nvme_fabrics_config'.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
util/argconfig.c