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

Function rte_kvargs_parse_delim

dpdk/lib/kvargs/rte_kvargs.c:262–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262struct rte_kvargs *
263rte_kvargs_parse_delim(const char *args, const char * const valid_keys[],
264 const char *valid_ends)
265{
266 struct rte_kvargs *kvlist = NULL;
267 char *copy;
268 size_t len;
269
270 if (valid_ends == NULL)
271 return rte_kvargs_parse(args, valid_keys);
272
273 copy = strdup(args);
274 if (copy == NULL)
275 return NULL;
276
277 len = strcspn(copy, valid_ends);
278 copy[len] = '\0';
279
280 kvlist = rte_kvargs_parse(copy, valid_keys);
281
282 free(copy);
283 return kvlist;
284}

Callers

nothing calls this directly

Calls 4

rte_kvargs_parseFunction · 0.85
strdupFunction · 0.85
strcspnFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected