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

Unified Diff: base/json_reader.cc

Issue 159104: Silence a false coverity warning by changing the code a bit. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « no previous file | base/json_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json_reader.cc
===================================================================
--- base/json_reader.cc (revision 21320)
+++ base/json_reader.cc (working copy)
@@ -601,15 +601,11 @@
// Block comment, read until */
json_pos_ += 2;
while ('\0' != *json_pos_) {
- switch (*json_pos_) {
- case '*':
- if ('/' == *(json_pos_ + 1)) {
- json_pos_ += 2;
- return true;
- }
- default:
- ++json_pos_;
+ if ('*' == *json_pos_ && '/' == *(json_pos_ + 1)) {
+ json_pos_ += 2;
+ return true;
}
+ ++json_pos_;
}
} else {
return false;
« no previous file with comments | « no previous file | base/json_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698