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

Unified Diff: webkit/glue/glue_serialize.cc

Issue 3089004: Mac: Some clang appeasing. (Closed)
Patch Set: '' Created 10 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 | « skia/ext/canvas_paint_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/glue_serialize.cc
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc
index caf37b45b62a4a98b8ebd28882bf27c9c9ff2c60..d0b9a866096930aeb76f131137547deaeec5e8c4 100644
--- a/webkit/glue/glue_serialize.cc
+++ b/webkit/glue/glue_serialize.cc
@@ -191,7 +191,9 @@ inline WebString ReadString(const SerializeObject* obj) {
// In version 2, the length field was the length in WebUChars.
// In version 1 and 3 it is the length in bytes.
- int bytes = ((obj->version == 2) ? length * sizeof(WebUChar) : length);
+ int bytes = length;
+ if (obj->version == 2)
+ bytes *= sizeof(WebUChar);
const void* data;
if (!ReadBytes(obj, &data, bytes))
« no previous file with comments | « skia/ext/canvas_paint_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698