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

Function is_valid_key

dpdk/lib/kvargs/rte_kvargs.c:117–127  ·  view source on GitHub ↗

* Determine whether a key is valid or not by looking * into a list of valid keys. */

Source from the content-addressed store, hash-verified

115 * into a list of valid keys.
116 */
117static int
118is_valid_key(const char * const valid[], const char *key_match)
119{
120 const char * const *valid_ptr;
121
122 for (valid_ptr = valid; *valid_ptr != NULL; valid_ptr++) {
123 if (strcmp(key_match, *valid_ptr) == 0)
124 return 1;
125 }
126 return 0;
127}
128
129/*
130 * Determine whether all keys are valid or not by looking

Callers 1

check_for_valid_keysFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected