mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
parse-util: use oom_score_adjust_is_valid() at one more place
This commit is contained in:
parent
c4412d4d33
commit
c62f67f730
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <linux/oom.h>
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -731,7 +730,7 @@ int parse_oom_score_adjust(const char *s, int *ret) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
if (v < OOM_SCORE_ADJ_MIN || v > OOM_SCORE_ADJ_MAX)
|
if (!oom_score_adjust_is_valid(v))
|
||||||
return -ERANGE;
|
return -ERANGE;
|
||||||
|
|
||||||
*ret = v;
|
*ret = v;
|
||||||
|
Loading…
Reference in New Issue
Block a user