MCPcopy Create free account
hub / github.com/F-Stack/f-stack / check_for_valid_keys

Function check_for_valid_keys

dpdk/lib/kvargs/rte_kvargs.c:133–147  ·  view source on GitHub ↗

* Determine whether all keys are valid or not by looking * into a list of valid keys. */

Source from the content-addressed store, hash-verified

131 * into a list of valid keys.
132 */
133static int
134check_for_valid_keys(struct rte_kvargs *kvlist,
135 const char * const valid[])
136{
137 unsigned i, ret;
138 struct rte_kvargs_pair *pair;
139
140 for (i = 0; i < kvlist->count; i++) {
141 pair = &kvlist->pairs[i];
142 ret = is_valid_key(valid, pair->key);
143 if (!ret)
144 return -1;
145 }
146 return 0;
147}
148
149/*
150 * Return the number of times a given arg_name exists in the key/value list.

Callers 1

rte_kvargs_parseFunction · 0.85

Calls 1

is_valid_keyFunction · 0.85

Tested by

no test coverage detected