summaryrefslogtreecommitdiffstats
path: root/webkit/glue/glue_serialize.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 04:27:19 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 04:27:19 +0000
commitf024f7900b966402d73c9516a9b7e6fe7e98684c (patch)
treefae561da12e5cbab2df4412c35bd6b75a0a18a06 /webkit/glue/glue_serialize.cc
parent30cb7a44b47b8ec5ef9607ef65dcd6aead29bbe9 (diff)
downloadchromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.zip
chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.tar.gz
chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.tar.bz2
Mac: Some clang appeasing.
BUG=TEST=none Review URL: http://codereview.chromium.org/3089004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/glue_serialize.cc')
-rw-r--r--webkit/glue/glue_serialize.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc
index caf37b45..d0b9a86 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))