diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-03-01 15:40:51 +0100 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-03-01 15:40:51 +0100 |
commit | 5009c77d600df5a36dcb33b435f5c5a7da80658f (patch) | |
tree | f315095a7bf7419aba8a1b2e1306b597b334d226 | |
parent | bb172dd46719d0e8da94bc2a2eb7d2e5b3a42293 (diff) | |
download | ceph-5009c77d600df5a36dcb33b435f5c5a7da80658f.tar.gz |
msg/Pipe.cc: reduce scope of some variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/msg/Pipe.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/msg/Pipe.cc b/src/msg/Pipe.cc index f5965be79e2..ad1fec007c7 100644 --- a/src/msg/Pipe.cc +++ b/src/msg/Pipe.cc @@ -1585,9 +1585,9 @@ static void alloc_aligned_buffer(bufferlist& data, unsigned len, unsigned off) { // create a buffer to read into that matches the data alignment unsigned left = len; - unsigned head = 0; if (off & ~CEPH_PAGE_MASK) { // head + unsigned head = 0; head = MIN(CEPH_PAGE_SIZE - (off & ~CEPH_PAGE_MASK), left); bufferptr bp = buffer::create(head); data.push_back(bp); @@ -1650,10 +1650,10 @@ int Pipe::read_message(Message **pm) int aborted; Message *message; utime_t recv_stamp = ceph_clock_now(msgr->cct); - bool waited_on_throttle = false; uint64_t message_size = header.front_len + header.middle_len + header.data_len; if (message_size) { + bool waited_on_throttle = false; if (policy.throttler) { ldout(msgr->cct,10) << "reader wants " << message_size << " from policy throttler " << policy.throttler->get_current() << "/" |