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

Function rewriteConfigBytesOption

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

Rewrite a simple "option-name " configuration option. */

Source from the content-addressed store, hash-verified

1280
1281/* Rewrite a simple "option-name <bytes>" configuration option. */
1282void rewriteConfigBytesOption(struct rewriteConfigState *state, const char *option, long long value, long long defvalue) {
1283 char buf[64];
1284 int force = value != defvalue;
1285 sds line;
1286
1287 rewriteConfigFormatMemory(buf,sizeof(buf),value);
1288 line = sdscatprintf(sdsempty(),"%s %s",option,buf);
1289 rewriteConfigRewriteLine(state,option,line,force);
1290}
1291
1292/* Rewrite a yes/no option. */
1293void rewriteConfigYesNoOption(struct rewriteConfigState *state, const char *option, int value, int defvalue) {

Callers 1

ifFunction · 0.85

Calls 4

sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
rewriteConfigRewriteLineFunction · 0.85

Tested by

no test coverage detected