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

Function configEnumGetValue

app/redis-6.2.6/src/config.c:261–267  ·  view source on GitHub ↗

Get enum value from name. If there is no match INT_MIN is returned. */

Source from the content-addressed store, hash-verified

259
260/* Get enum value from name. If there is no match INT_MIN is returned. */
261int configEnumGetValue(configEnum *ce, char *name) {
262 while(ce->name != NULL) {
263 if (!strcasecmp(ce->name,name)) return ce->val;
264 ce++;
265 }
266 return INT_MIN;
267}
268
269/* Get enum name from value. If no match is found NULL is returned. */
270const char *configEnumGetName(configEnum *ce, int val) {

Callers 1

enumConfigSetFunction · 0.85

Calls 1

strcasecmpFunction · 0.85

Tested by

no test coverage detected