From 88c4554af388c56ebba22b419ecf3d88aed311db Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Thu, 6 Dec 2018 13:45:16 +0800 Subject: [PATCH] common/buffer: remove repeated condtion-check. In func push_back(), it already check buffe::ptr::length(). Signed-off-by: Jianpeng Ma --- src/common/buffer.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index b1c533ed310..734cc20bbd4 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -1539,13 +1539,11 @@ using namespace ceph; void buffer::list::append(const ptr& bp) { - if (bp.length()) push_back(bp); } void buffer::list::append(ptr&& bp) { - if (bp.length()) push_back(std::move(bp)); }