clang format

This commit is contained in:
springzfx
2020-05-25 17:03:17 +08:00
parent 16a341205f
commit 221a75ae7b
7 changed files with 83 additions and 60 deletions

View File

@@ -25,9 +25,10 @@ string get_cgroup2_mount_point() {
stringstream buffer;
FILE *fp = popen("findmnt -t cgroup2 -n -o TARGET", "r");
if (!fp) return "";
char buf[64]; while (fgets(buf,64,fp)!=NULL) { buffer<<buf; }
char buf[64];
while (fgets(buf, 64, fp) != NULL) { buffer << buf; }
pclose(fp);
string s=buffer.str();
string s = buffer.str();
s.pop_back(); // remove newline character
return s;
}