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

Function rewriteConfigYesNoOption

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

Rewrite a yes/no option. */

Source from the content-addressed store, hash-verified

1291
1292/* Rewrite a yes/no option. */
1293void rewriteConfigYesNoOption(struct rewriteConfigState *state, const char *option, int value, int defvalue) {
1294 int force = value != defvalue;
1295 sds line = sdscatprintf(sdsempty(),"%s %s",option,
1296 value ? "yes" : "no");
1297
1298 rewriteConfigRewriteLine(state,option,line,force);
1299}
1300
1301/* Rewrite a string option. */
1302void rewriteConfigStringOption(struct rewriteConfigState *state, const char *option, char *value, const char *defvalue) {

Callers 1

boolConfigRewriteFunction · 0.85

Calls 3

sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
rewriteConfigRewriteLineFunction · 0.85

Tested by

no test coverage detected