[prev in list] [next in list] [prev in thread] [next in thread]
List: mesos-commits
Subject: (mesos) branch master updated: Address clang-tidy errors.
From: bmahler () apache ! org
Date: 2024-03-15 21:43:38
Message-ID: 171053901833.2696280.5784830919744011268 () gitbox2-he-fi ! apache ! org
[Download RAW message or body]
This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 3f6c581d2 Address clang-tidy errors.
3f6c581d2 is described below
commit 3f6c581d2f365e5fc7ee97772edf3e3b6a7b6076
Author: Devin Leamy <dleamy@twitter.com>
AuthorDate: Fri Mar 15 21:12:50 2024 +0000
Address clang-tidy errors.
Fixes clang-tidy errors in ebpf and cgroups2.
---
src/linux/cgroups2.cpp | 2 +-
src/linux/ebpf.cpp | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/linux/cgroups2.cpp b/src/linux/cgroups2.cpp
index c63ff5824..ef7ac7ce1 100644
--- a/src/linux/cgroups2.cpp
+++ b/src/linux/cgroups2.cpp
@@ -201,7 +201,7 @@ Try<bool> mounted()
return Error("Failed to read /proc/mounts: " + mountTable.error());
}
- foreach (MountTable::Entry entry, mountTable.get().entries) {
+ foreach (MountTable::Entry entry, mountTable->entries) {
if (entry.type == cgroups2::FILE_SYSTEM) {
if (entry.dir == MOUNT_POINT) {
return true;
diff --git a/src/linux/ebpf.cpp b/src/linux/ebpf.cpp
index 3d1d88ebb..c280c9114 100644
--- a/src/linux/ebpf.cpp
+++ b/src/linux/ebpf.cpp
@@ -91,7 +91,9 @@ Try<int> load(const Program& program)
CHECK_ERROR(fd);
CHECK_EQ(EACCES, fd.error().code)
<< "Expected BPF syscall to fail again with EACCES";
- return Error(string("BPF verifier failed: ") + verifier_logs.c_str());
+ // Convert `verifier_logs` to a C string to avoid outputting
+ // the zeroed bytes.
+ return Error(string("BPF verifier failed: ") + verifier_logs.data());
}
if (fd.isError()) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic