1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

parse-util: use oom_score_adjust_is_valid() at one more place

This commit is contained in:
Lennart Poettering 2021-07-28 18:23:50 +02:00
parent c4412d4d33
commit c62f67f730

View File

@ -2,7 +2,6 @@
#include <errno.h>
#include <inttypes.h>
#include <linux/oom.h>
#include <net/if.h>
#include <stdio.h>
#include <stdlib.h>
@ -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;