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

Function rewriteConfigAddLineNumberToOption

src/config.cpp:1359–1367  ·  view source on GitHub ↗

Populate the option -> list of line numbers map. */

Source from the content-addressed store, hash-verified

1357
1358/* Populate the option -> list of line numbers map. */
1359void rewriteConfigAddLineNumberToOption(struct rewriteConfigState *state, sds option, int linenum) {
1360 list *l = (list*)dictFetchValue(state->option_to_line,option);
1361
1362 if (l == NULL) {
1363 l = listCreate();
1364 dictAdd(state->option_to_line,sdsdup(option),l);
1365 }
1366 listAddNodeTail(l,(void*)(long)linenum);
1367}
1368
1369/* Add the specified option to the set of processed options.
1370 * This is useful as only unused lines of processed options will be blanked

Callers 1

rewriteConfigReadOldFileFunction · 0.85

Calls 5

dictFetchValueFunction · 0.85
listCreateFunction · 0.85
sdsdupFunction · 0.85
listAddNodeTailFunction · 0.85
dictAddFunction · 0.70

Tested by

no test coverage detected