MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / configEnumGetName

Function configEnumGetName

src/config.cpp:284–290  ·  view source on GitHub ↗

Get enum name from value. If no match is found NULL is returned. */

Source from the content-addressed store, hash-verified

282
283/* Get enum name from value. If no match is found NULL is returned. */
284const char *configEnumGetName(configEnum *ce, int val) {
285 while(ce->name != NULL) {
286 if (ce->val == val) return ce->name;
287 ce++;
288 }
289 return NULL;
290}
291
292/* Wrapper for configEnumGetName() returning "unknown" instead of NULL if
293 * there is no match. */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected