]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Make oom_score_adjust_is_valid() static
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 23 Jul 2021 09:06:13 +0000 (11:06 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 23 Jul 2021 09:39:45 +0000 (11:39 +0200)
It has only one user and we don't need to put it in basic/.

src/basic/process-util.c
src/basic/process-util.h
src/core/dbus-execute.c

index 30a608231ead5e17d8c1b31337819463a972121d..4ca22a583f32aa2f28260fa2ea49aa3c01edb046 100644 (file)
@@ -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;
 
index 73717dd3a4fa99814d4e1fae7dce8d7e11e0162e..58a3ebd577694817e8fda4f41d5751a4a1a0f0f8 100644 (file)
@@ -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
index f6783e924ab356e52747f3b44bc12dc599cfdd69..f7784bb73dce3c678f6b3ab701d87af42c58f8ba 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <linux/oom.h>
 #include <sys/mount.h>
 #include <sys/prctl.h>
 
@@ -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,