Rewrite a simple "option-name " configuration option. */
| 1280 | |
| 1281 | /* Rewrite a simple "option-name <bytes>" configuration option. */ |
| 1282 | void 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. */ |
| 1293 | void rewriteConfigYesNoOption(struct rewriteConfigState *state, const char *option, int value, int defvalue) { |
no test coverage detected