From 64ecc87057a3214eef8528f3b937e1e8e3b1577d Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Fri, 30 Nov 2012 17:21:24 -0800 Subject: [PATCH] Striper: use local variable inside if() that tested it Signed-off-by: Dan Mick (cherry picked from commit 917a6f296323164f9d79df94916932722e66fc0a) --- src/osdc/Striper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osdc/Striper.cc b/src/osdc/Striper.cc index 26e2b917bb7..7b5a402893f 100644 --- a/src/osdc/Striper.cc +++ b/src/osdc/Striper.cc @@ -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);