Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
e61adc0d
Unverified
Commit
e61adc0d
authored
Aug 21, 2020
by
Wen Hui
Committed by
GitHub
Aug 21, 2020
Browse files
fix make warnings (#7692)
parent
89f2bfbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
e61adc0d
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment