diff options
author | Sage Weil <sage@newdream.net> | 2011-05-18 19:06:44 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-18 19:07:02 +0200 |
commit | baba0a7ab32edda025edd23f14d349ec5b9a7bf9 (patch) | |
tree | 2b3724697ea99fc9375c5f06fe916349fc971bff | |
parent | crush: fix clitest now that leading spaces are stripped (diff) | |
download | ceph-baba0a7ab32edda025edd23f14d349ec5b9a7bf9.tar.xz ceph-baba0a7ab32edda025edd23f14d349ec5b9a7bf9.zip |
msgr: fix signedness in alloc_aligned_buffer
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | src/msg/SimpleMessenger.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index 75df7c562e8..5734555a090 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -1775,11 +1775,11 @@ void SimpleMessenger::Pipe::unlock_maybe_reap() } } -static void alloc_aligned_buffer(bufferlist& data, int len, int off) +static void alloc_aligned_buffer(bufferlist& data, unsigned len, unsigned off) { // create a buffer to read into that matches the data alignment - int left = len; - int head = 0; + unsigned left = len; + unsigned head = 0; if (off & ~PAGE_MASK) { // head head = MIN(PAGE_SIZE - (off & ~PAGE_MASK), left); @@ -1787,7 +1787,7 @@ static void alloc_aligned_buffer(bufferlist& data, int len, int off) data.push_back(bp); left -= head; } - int middle = left & PAGE_MASK; + unsigned middle = left & PAGE_MASK; if (middle > 0) { bufferptr bp = buffer::create_page_aligned(middle); data.push_back(bp); |