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

Function rewriteConfigEnumOption

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

Rewrite an enumeration option. It takes as usually state and option name, * and in addition the enumeration array and the default value for the * option. */

Source from the content-addressed store, hash-verified

1362 * and in addition the enumeration array and the default value for the
1363 * option. */
1364void rewriteConfigEnumOption(struct rewriteConfigState *state, const char *option, int value, configEnum *ce, int defval) {
1365 sds line;
1366 const char *name = configEnumGetNameOrUnknown(ce,value);
1367 int force = value != defval;
1368
1369 line = sdscatprintf(sdsempty(),"%s %s",option,name);
1370 rewriteConfigRewriteLine(state,option,line,force);
1371}
1372
1373/* Rewrite the save option. */
1374void rewriteConfigSaveOption(struct rewriteConfigState *state) {

Callers 1

enumConfigRewriteFunction · 0.85

Calls 4

sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
rewriteConfigRewriteLineFunction · 0.85

Tested by

no test coverage detected