summaryrefslogtreecommitdiffstats
path: root/linux/CGroupUtils.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2022-10-22 19:19:39 +0200
committerBenBE <BenBE@geshi.org>2022-10-24 23:13:22 +0200
commit40104588f38250afde9f71b6204d789039bbfe3e (patch)
tree745e532580371db2ca85b4ae57b10f1ad3396531 /linux/CGroupUtils.c
parent4ad530d1c00f649dcd02b818a3ccc7ded0aaf12d (diff)
Reformat code base
This includes: - Wrap function implementations - Pointer alignment for function signatures - Pointer alignment for variable declarations - Whitespace after keywords - Whitespace after comma - Whitespace around initializers - Whitespace around operators - Code indentation - Line break for single line statements - Misleading alignment
Diffstat (limited to 'linux/CGroupUtils.c')
-rw-r--r--linux/CGroupUtils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/linux/CGroupUtils.c b/linux/CGroupUtils.c
index 22cce91b..c11c4608 100644
--- a/linux/CGroupUtils.c
+++ b/linux/CGroupUtils.c
@@ -11,7 +11,7 @@ in the source distribution for its full text.
typedef struct StrBuf_state {
- char *buf;
+ char* buf;
size_t size;
size_t pos;
} StrBuf_state;
@@ -60,7 +60,7 @@ static bool Label_checkSuffix(const char* labelStart, size_t labelLen, const cha
return labelLen > strlen(expected) && String_startsWith(labelStart + labelLen - strlen(expected), expected);
}
-static bool CGroup_filterName_internal(const char *cgroup, StrBuf_state* s, StrBuf_putc_t w) {
+static bool CGroup_filterName_internal(const char* cgroup, StrBuf_state* s, StrBuf_putc_t w) {
const char* str_slice_suffix = ".slice";
const char* str_system_slice = "system.slice";
const char* str_user_slice = "user.slice";
@@ -237,7 +237,7 @@ static bool CGroup_filterName_internal(const char *cgroup, StrBuf_state* s, StrB
if (String_startsWith(cgroup, "user@")) {
cgroup = nextSlash;
- while(*cgroup == '/')
+ while (*cgroup == '/')
cgroup++;
continue;
@@ -275,7 +275,7 @@ static bool CGroup_filterName_internal(const char *cgroup, StrBuf_state* s, StrB
cgroup += strlen(str_nspawn_payload_label);
continue;
- } else if(Label_checkPrefix(labelStart, scopeNameLen, str_snap_scope_prefix)) {
+ } else if (Label_checkPrefix(labelStart, scopeNameLen, str_snap_scope_prefix)) {
const char* nextDot = strchrnul(labelStart + strlen(str_snap_scope_prefix), '.');
if (!StrBuf_putsz(s, w, "!snap:"))
@@ -316,7 +316,7 @@ static bool CGroup_filterName_internal(const char *cgroup, StrBuf_state* s, StrB
return true;
}
-char* CGroup_filterName(const char *cgroup) {
+char* CGroup_filterName(const char* cgroup) {
StrBuf_state s = {
.buf = NULL,
.size = 0,

© 2014-2024 Faster IT GmbH | imprint | privacy policy