From c62f67f73020a47b23c99d4f0be68a1dcf07b4b9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 28 Jul 2021 18:23:50 +0200 Subject: [PATCH] parse-util: use oom_score_adjust_is_valid() at one more place --- src/basic/parse-util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c index b79c885dfd2..70062eba2aa 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -2,7 +2,6 @@ #include #include -#include #include #include #include @@ -731,7 +730,7 @@ int parse_oom_score_adjust(const char *s, int *ret) { if (r < 0) return r; - if (v < OOM_SCORE_ADJ_MIN || v > OOM_SCORE_ADJ_MAX) + if (!oom_score_adjust_is_valid(v)) return -ERANGE; *ret = v;