Rewrite the oom-score-adj-values option. */
| 1761 | |
| 1762 | /* Rewrite the oom-score-adj-values option. */ |
| 1763 | void rewriteConfigOOMScoreAdjValuesOption(struct rewriteConfigState *state) { |
| 1764 | int force = 0; |
| 1765 | int j; |
| 1766 | const char *option = "oom-score-adj-values"; |
| 1767 | sds line; |
| 1768 | |
| 1769 | line = sdsnew(option); |
| 1770 | line = sdscatlen(line, " ", 1); |
| 1771 | for (j = 0; j < CONFIG_OOM_COUNT; j++) { |
| 1772 | if (g_pserver->oom_score_adj_values[j] != configOOMScoreAdjValuesDefaults[j]) |
| 1773 | force = 1; |
| 1774 | |
| 1775 | line = sdscatprintf(line, "%d", g_pserver->oom_score_adj_values[j]); |
| 1776 | if (j+1 != CONFIG_OOM_COUNT) |
| 1777 | line = sdscatlen(line, " ", 1); |
| 1778 | } |
| 1779 | rewriteConfigRewriteLine(state,option,line,force); |
| 1780 | } |
| 1781 | |
| 1782 | /* Rewrite the bind option. */ |
| 1783 | void rewriteConfigBindOption(struct rewriteConfigState *state) { |
no test coverage detected