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 <[email protected]>
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()) {