summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrkn@chromium.org <rkn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-03 19:43:08 +0000
committerrkn@chromium.org <rkn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-03 19:43:08 +0000
commitd2815d94e2e1aa6208529ef4359bb2fab1ce1601 (patch)
tree8b6ea0a3a02d013ce0243a149b9b7c6616da9103 /net
parent1bfb971ff8bd586625d435d4a95592b0b532eab3 (diff)
downloadchromium_src-d2815d94e2e1aa6208529ef4359bb2fab1ce1601.zip
chromium_src-d2815d94e2e1aa6208529ef4359bb2fab1ce1601.tar.gz
chromium_src-d2815d94e2e1aa6208529ef4359bb2fab1ce1601.tar.bz2
Changed "set_id" in "union SettingsFlagsAndId" so that it gives "flags()" the correct byte ordering.
Review URL: http://codereview.chromium.org/7066009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/spdy/spdy_protocol.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
index aa28b3c..8fb0e1c 100644
--- a/net/spdy/spdy_protocol.h
+++ b/net/spdy/spdy_protocol.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -303,8 +303,7 @@ union SettingsFlagsAndId {
uint32 id() const { return (ntohl(id_) & kSettingsIdMask); }
void set_id(uint32 id) {
DCHECK_EQ(0u, (id & ~kSettingsIdMask));
- id = htonl(id & kSettingsIdMask);
- id_ = flags() | id;
+ id_ = htonl((flags() << 24) | (id & kSettingsIdMask));
}
uint8 flags_[4]; // 8 bits