Striper: use local variable inside if() that tested it

Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 917a6f2963)
This commit is contained in:
Dan Mick 2012-11-30 17:21:24 -08:00
parent 690f817560
commit 64ecc87057

View File

@ -284,7 +284,7 @@ void Striper::StripedReadResult::assemble_result(CephContext *cct, bufferlist& b
size_t len = p->second.first.length();
if (len < p->second.second) {
if (zero_tail || bl.length()) {
bufferptr bp(p->second.second - p->second.first.length());
bufferptr bp(p->second.second - len);
bp.zero();
bl.push_front(bp);
bl.claim_prepend(p->second.first);