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

Side by Side Diff: sandbox/linux/seccomp/library.cc

Issue 597023: linux: turn on -Wextra (Closed)
Patch Set: more Created 10 years, 9 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 unified diff | Download patch
« no previous file with comments | « sandbox/linux/seccomp/library.h ('k') | sandbox/linux/seccomp/sandbox_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #define XOPEN_SOURCE 500 5 #define XOPEN_SOURCE 500
6 #include <algorithm> 6 #include <algorithm>
7 #include <elf.h> 7 #include <elf.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <errno.h> 9 #include <errno.h>
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (!valid_) { 311 if (!valid_) {
312 return NULL; 312 return NULL;
313 } 313 }
314 SectionTable::const_iterator iter = section_table_.find(section); 314 SectionTable::const_iterator iter = section_table_.find(section);
315 if (iter == section_table_.end()) { 315 if (iter == section_table_.end()) {
316 return NULL; 316 return NULL;
317 } 317 }
318 return &iter->second.second; 318 return &iter->second.second;
319 } 319 }
320 320
321 const int Library::getSectionIndex(const string& section) { 321 int Library::getSectionIndex(const string& section) {
322 if (!valid_) { 322 if (!valid_) {
323 return -1; 323 return -1;
324 } 324 }
325 SectionTable::const_iterator iter = section_table_.find(section); 325 SectionTable::const_iterator iter = section_table_.find(section);
326 if (iter == section_table_.end()) { 326 if (iter == section_table_.end()) {
327 return -1; 327 return -1;
328 } 328 }
329 return iter->second.first; 329 return iter->second.first;
330 } 330 }
331 331
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 } 1202 }
1203 iter = symbols_.find("__kernel_rt_sigreturn"); 1203 iter = symbols_.find("__kernel_rt_sigreturn");
1204 if (iter != symbols_.end() && iter->second.st_value) { 1204 if (iter != symbols_.end() && iter->second.st_value) {
1205 __kernel_rt_sigreturn = asr_offset_ + iter->second.st_value; 1205 __kernel_rt_sigreturn = asr_offset_ + iter->second.st_value;
1206 } 1206 }
1207 1207
1208 return true; 1208 return true;
1209 } 1209 }
1210 1210
1211 } // namespace 1211 } // namespace
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp/library.h ('k') | sandbox/linux/seccomp/sandbox_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698