Populate the option -> list of line numbers map. */
| 1107 | |
| 1108 | /* Populate the option -> list of line numbers map. */ |
| 1109 | void rewriteConfigAddLineNumberToOption(struct rewriteConfigState *state, sds option, int linenum) { |
| 1110 | list *l = dictFetchValue(state->option_to_line,option); |
| 1111 | |
| 1112 | if (l == NULL) { |
| 1113 | l = listCreate(); |
| 1114 | dictAdd(state->option_to_line,sdsdup(option),l); |
| 1115 | } |
| 1116 | listAddNodeTail(l,(void*)(long)linenum); |
| 1117 | } |
| 1118 | |
| 1119 | /* Add the specified option to the set of processed options. |
| 1120 | * This is useful as only unused lines of processed options will be blanked |
no test coverage detected