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

Function configEnumGetName

app/redis-6.2.6/src/config.c:270–276  ·  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

268
269/* Get enum name from value. If no match is found NULL is returned. */
270const char *configEnumGetName(configEnum *ce, int val) {
271 while(ce->name != NULL) {
272 if (ce->val == val) return ce->name;
273 ce++;
274 }
275 return NULL;
276}
277
278/* Wrapper for configEnumGetName() returning "unknown" instead of NULL if
279 * there is no match. */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected