diff options
author | orenb@chromium.org <orenb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 22:48:27 +0000 |
---|---|---|
committer | orenb@chromium.org <orenb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 22:48:27 +0000 |
commit | 6574d79ef25774136a4ce1e209c11d2424f9a6b2 (patch) | |
tree | 8e58ab549e6c5bf080f443f0fb50407fa389f620 /sandbox | |
parent | 7f806f9ffbfc4bcce6308c8fe6dd4fbd513058ad (diff) | |
download | chromium_src-6574d79ef25774136a4ce1e209c11d2424f9a6b2.zip chromium_src-6574d79ef25774136a4ce1e209c11d2424f9a6b2.tar.gz chromium_src-6574d79ef25774136a4ce1e209c11d2424f9a6b2.tar.bz2 |
Fixed coverity defects pertaining to pass-by-value use where pass-by-reference is preferred
CID_COUNT=3
CID=(104210, 104215),104237,104238
BUG=
TEST=
TBR=jln,bolms,brettw
Review URL: https://chromiumcodereview.appspot.com/10825016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/seccomp-bpf/sandbox_bpf.cc | 2 | ||||
-rw-r--r-- | sandbox/linux/seccomp-bpf/sandbox_bpf.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc index ffbf7cf..9599544 100644 --- a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc @@ -249,7 +249,7 @@ bool Sandbox::isSingleThreaded(int proc_fd) { return true; } -static bool isDenied(Sandbox::ErrorCode code) { +static bool isDenied(const Sandbox::ErrorCode& code) { return (code & SECCOMP_RET_ACTION) == SECCOMP_RET_TRAP || (code >= (SECCOMP_RET_ERRNO + 1) && code <= (SECCOMP_RET_ERRNO + 4095)); diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.h b/sandbox/linux/seccomp-bpf/sandbox_bpf.h index 3696668..414327d 100644 --- a/sandbox/linux/seccomp-bpf/sandbox_bpf.h +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.h @@ -325,7 +325,7 @@ class Sandbox { friend class Util; friend class Verifier; struct Range { - Range(uint32_t f, uint32_t t, ErrorCode e) : + Range(uint32_t f, uint32_t t, const ErrorCode& e) : from(f), to(t), err(e) { |