]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/buffer: remove repeated condtion-check. 25420/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 6 Dec 2018 05:45:16 +0000 (13:45 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 6 Dec 2018 05:47:21 +0000 (13:47 +0800)
In func push_back(), it already check buffe::ptr::length().

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/common/buffer.cc

index b1c533ed3100fb2b08891bd1e4e7bf98c523c887..734cc20bbd44daf0b4ca45b48375f3b238c8c892 100644 (file)
@@ -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));
   }