From 6bf3c6c9007ca87376d5dff1e029186a38736cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 23 Jul 2021 11:06:13 +0200 Subject: [PATCH] Make oom_score_adjust_is_valid() static It has only one user and we don't need to put it in basic/. --- src/basic/process-util.c | 4 ---- src/basic/process-util.h | 2 -- src/core/dbus-execute.c | 5 +++++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 30a608231ea..4ca22a583f3 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1061,10 +1061,6 @@ _noreturn_ void freeze(void) { pause(); } -bool oom_score_adjust_is_valid(int oa) { - return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX; -} - unsigned long personality_from_string(const char *p) { int architecture; diff --git a/src/basic/process-util.h b/src/basic/process-util.h index 73717dd3a4f..58a3ebd5776 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -84,8 +84,6 @@ bool is_main_thread(void); _noreturn_ void freeze(void); -bool oom_score_adjust_is_valid(int oa); - #ifndef PERSONALITY_INVALID /* personality(7) documents that 0xffffffffUL is used for querying the * current personality, hence let's use that here as error diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index f6783e924ab..f7784bb73dc 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include @@ -94,6 +95,10 @@ static int property_get_environment_files( return sd_bus_message_close_container(reply); } +static bool oom_score_adjust_is_valid(int oa) { + return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX; +} + static int property_get_oom_score_adjust( sd_bus *bus, const char *path,