Revision: 2568
Author:
dbat...@google.com
Date: Thu Dec 12 16:01:14 2013 UTC
Log: Fix a comparison of StringPiece::find()
http://code.google.com/p/page-speed/source/detail?r=2568
Modified:
/lib/trunk/src/pagespeed/rules/avoid_plugins.cc
=======================================
--- /lib/trunk/src/pagespeed/rules/avoid_plugins.cc Wed Dec 4 21:21:08
2013 UTC
+++ /lib/trunk/src/pagespeed/rules/avoid_plugins.cc Thu Dec 12 16:01:14
2013 UTC
@@ -783,7 +783,7 @@
// the first one to report to the user.
base::StringPiece archives_piece(archive);
const size_t first_comma_index = archives_piece.find(",");
- if (first_comma_index >= 0) {
+ if (first_comma_index != base::StringPiece::npos) {
archives_piece.substr(0, first_comma_index).CopyToString(&src);
} else {
src = archive;