numam-dpdk/lib/librte_kvargs
Bruce Richardson 0615355ffa kvargs: make pointers in string arrays const
Change the parameters of functions from const char *valid[] to
const char * const valid[]. This additional const is needed to
allow us to fix some checkpatch warnings, as well as being good
programming practice.

For the checkpatch warnings, if we have a set of command line
args that we want to check defined as:
	static const char *args[] = { "arg1", "arg2", NULL };
	kvlist = rte_kvargs_parse(params, args);

checkpatch will complain:
	WARNING:STATIC_CONST_CHAR_ARRAY: static const char *
	array should probably be static const char * const

Adding the additional const to the definition of the args
will then trigger a compiler error in the absence of this
change to the kvargs library, as we lose the const in the
call to kvargs_parse.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-01-13 19:28:26 +01:00
..
Makefile mk: add library version extension 2015-02-03 16:56:58 +01:00
rte_kvargs_version.map lib: provide initial versioning 2015-02-03 16:56:58 +01:00
rte_kvargs.c kvargs: make pointers in string arrays const 2017-01-13 19:28:26 +01:00
rte_kvargs.h kvargs: make pointers in string arrays const 2017-01-13 19:28:26 +01:00