Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: sandbox/linux/seccomp-bpf/verifier.cc

Issue 10833044: Refactored ErrorCode into it's own class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unittest (and new framework to make this possible) Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sandbox/linux/seccomp-bpf/verifier.cc
diff --git a/sandbox/linux/seccomp-bpf/verifier.cc b/sandbox/linux/seccomp-bpf/verifier.cc
index 52a385eeb6dc4c86980cb92ebcf1923c9f0c6207..882e96f6e6133757f5369905da7084350f8cb4f4 100644
--- a/sandbox/linux/seccomp-bpf/verifier.cc
+++ b/sandbox/linux/seccomp-bpf/verifier.cc
@@ -36,11 +36,11 @@ bool Verifier::verifyBPF(const std::vector<struct sock_filter>& program,
#endif
struct arch_seccomp_data data = { sysnum, SECCOMP_ARCH };
- Sandbox::ErrorCode code = evaluateSyscall(sysnum);
+ ErrorCode code = evaluateSyscall(sysnum);
uint32_t computedRet = evaluateBPF(program, data, err);
if (*err) {
return false;
- } else if (computedRet != code) {
+ } else if (computedRet != code.err()) {
*err = "Exit code from BPF program doesn't match";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698