You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ab...@apache.org on 2020/04/16 17:06:40 UTC
[mesos] branch master updated: Fixed unreachable code warning for
`cgroups::destroy`.
This is an automated email from the ASF dual-hosted git repository.
abudnik 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 6d76751 Fixed unreachable code warning for `cgroups::destroy`.
6d76751 is described below
commit 6d767512bbc46029632e0b7f991f54a61d7ee6a3
Author: Andrei Budnik <ab...@apache.org>
AuthorDate: Thu Apr 16 12:50:22 2020 +0200
Fixed unreachable code warning for `cgroups::destroy`.
This was noted by coverity in CID 1462222.
Review: https://reviews.apache.org/r/72370
---
src/linux/cgroups.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index 5f10470..bfc48d6 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -1637,12 +1637,10 @@ Future<Nothing> destroy(const string& hierarchy, const string& cgroup)
Future<Nothing> future = destroyer->future();
spawn(destroyer, true);
return future;
- } else {
- // Otherwise, attempt to remove the cgroups in bottom-up fashion.
- return internal::remove(hierarchy, candidates);
}
- return Nothing();
+ // Attempt to remove the cgroups in a bottom-up fashion.
+ return internal::remove(hierarchy, candidates);
}