You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by nn...@apache.org on 2014/02/04 00:23:59 UTC

git commit: Initialized local in cgroups and process isolator.

Updated Branches:
  refs/heads/master d3e277d04 -> 2f435e1fd


Initialized local in cgroups and process isolator.

The local fields in cgroups and process isolator was uninitialized in
constructors and reported by Coverity:

Defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)

** CID 1167299: Uninitialized scalar field (UNINIT_CTOR)
/src/slave/process_isolator.cpp: 71 in
mesos::internal::slave::ProcessIsolator::ProcessIsolator()()

** CID 1167300: Uninitialized scalar field (UNINIT_CTOR)
/src/slave/cgroups_isolator.cpp: 198 in
mesos::internal::slave::CgroupsIsolator::CgroupsIsolator()()

Even though ::initialize() does set local, this patch should silence
the code scan.

Review: https://reviews.apache.org/r/17663


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2f435e1f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2f435e1f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2f435e1f

Branch: refs/heads/master
Commit: 2f435e1fd70dd1f1e48c5f1d2d46c089e57a5ed4
Parents: d3e277d
Author: Niklas Q. Nielsen <ni...@mesosphere.io>
Authored: Mon Feb 3 23:14:21 2014 +0000
Committer: Niklas Q. Nielsen <ni...@mesosphere.io>
Committed: Mon Feb 3 23:14:21 2014 +0000

----------------------------------------------------------------------
 src/slave/cgroups_isolator.cpp | 1 +
 src/slave/process_isolator.cpp | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2f435e1f/src/slave/cgroups_isolator.cpp
----------------------------------------------------------------------
diff --git a/src/slave/cgroups_isolator.cpp b/src/slave/cgroups_isolator.cpp
index 690ae81..ef7dd68 100644
--- a/src/slave/cgroups_isolator.cpp
+++ b/src/slave/cgroups_isolator.cpp
@@ -194,6 +194,7 @@ std::ostream& operator << (std::ostream& out, const Cpuset& cpuset)
 
 CgroupsIsolator::CgroupsIsolator()
   : ProcessBase(ID::generate("cgroups-isolator")),
+    local(false),
     initialized(false),
     lockFile(None()) {}
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/2f435e1f/src/slave/process_isolator.cpp
----------------------------------------------------------------------
diff --git a/src/slave/process_isolator.cpp b/src/slave/process_isolator.cpp
index 748d9c2..09cb996 100644
--- a/src/slave/process_isolator.cpp
+++ b/src/slave/process_isolator.cpp
@@ -68,6 +68,7 @@ using state::RunState;
 
 ProcessIsolator::ProcessIsolator()
   : ProcessBase(ID::generate("process-isolator")),
+    local(false),
     initialized(false) {}