mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
fix make warnings (#7692)
This commit is contained in:
parent
89f2bfbb58
commit
e61adc0d89
@ -2551,9 +2551,6 @@ static void readOOMScoreAdj(void) {
|
||||
* depending on current role.
|
||||
*/
|
||||
int setOOMScoreAdj(int process_class) {
|
||||
int fd;
|
||||
int val;
|
||||
char buf[64];
|
||||
|
||||
if (!server.oom_score_adj) return C_OK;
|
||||
if (process_class == -1)
|
||||
@ -2562,6 +2559,10 @@ int setOOMScoreAdj(int process_class) {
|
||||
serverAssert(process_class >= 0 && process_class < CONFIG_OOM_COUNT);
|
||||
|
||||
#ifdef HAVE_PROC_OOM_SCORE_ADJ
|
||||
int fd;
|
||||
int val;
|
||||
char buf[64];
|
||||
|
||||
val = server.oom_score_adj_base + server.oom_score_adj_values[process_class];
|
||||
if (val > 1000) val = 1000;
|
||||
if (val < -1000) val = -1000;
|
||||
|
Loading…
Reference in New Issue
Block a user