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

Function rewriteConfigYesNoOption

src/config.cpp:1544–1550  ·  view source on GitHub ↗

Rewrite a yes/no option. */

Source from the content-addressed store, hash-verified

1542
1543/* Rewrite a yes/no option. */
1544void rewriteConfigYesNoOption(struct rewriteConfigState *state, const char *option, int value, int defvalue) {
1545 int force = value != defvalue;
1546 sds line = sdscatprintf(sdsempty(),"%s %s",option,
1547 value ? "yes" : "no");
1548
1549 rewriteConfigRewriteLine(state,option,line,force);
1550}
1551
1552/* Rewrite a string option. */
1553void rewriteConfigStringOption(struct rewriteConfigState *state, const char *option, const char *value, const char *defvalue) {

Callers 2

rewriteConfigFunction · 0.85
boolConfigRewriteFunction · 0.85

Calls 3

sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
rewriteConfigRewriteLineFunction · 0.85

Tested by

no test coverage detected