summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-12-07 18:51:18 +0100
committerGitHub <noreply@github.com>2024-12-07 18:51:18 +0100
commit8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 (patch)
tree5b6654818049a0743f62defc090e86d4327cccbb /src/init
parentb1e5cc66bdb20b002c93479490c3a317552210b3 (diff)
core: Add clang-tidy (#8664)
This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
Diffstat (limited to 'src/init')
-rw-r--r--src/init/initHelpers.cpp6
-rw-r--r--src/init/initHelpers.hpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/init/initHelpers.cpp b/src/init/initHelpers.cpp
index 2cc491d0..c27f625c 100644
--- a/src/init/initHelpers.cpp
+++ b/src/init/initHelpers.cpp
@@ -1,10 +1,10 @@
#include "initHelpers.hpp"
-bool Init::isSudo() {
+bool NInit::isSudo() {
return getuid() != geteuid() || !geteuid();
}
-void Init::gainRealTime() {
+void NInit::gainRealTime() {
const int minPrio = sched_get_priority_min(SCHED_RR);
int old_policy;
struct sched_param param;
@@ -21,7 +21,7 @@ void Init::gainRealTime() {
return;
}
- pthread_atfork(NULL, NULL, []() {
+ pthread_atfork(nullptr, nullptr, []() {
const struct sched_param param = {.sched_priority = 0};
if (pthread_setschedparam(pthread_self(), SCHED_OTHER, &param))
Debug::log(WARN, "Failed to reset process scheduling strategy");
diff --git a/src/init/initHelpers.hpp b/src/init/initHelpers.hpp
index da9b762a..63cec957 100644
--- a/src/init/initHelpers.hpp
+++ b/src/init/initHelpers.hpp
@@ -2,7 +2,7 @@
#include "../defines.hpp"
-namespace Init {
+namespace NInit {
bool isSudo();
void gainRealTime();
}; \ No newline at end of file