remove useless self-assignment in folly::iobuf
authorLouis Brandy <ldbrandy@fb.com>
Wed, 3 Jun 2015 21:24:26 +0000 (14:24 -0700)
committerNoam Lerner <noamler@fb.com>
Fri, 5 Jun 2015 02:31:13 +0000 (19:31 -0700)
Summary:
I'm pretty sure this doesn't do anything.

Based on a cursory review, I also don't think this is a bug (ie, it should have been assigned to something else).

Test Plan: fbconfig -r folly && fbmake runtests

Reviewed By: tudorb@fb.com

Subscribers: net-systems@, enis, folly-diffs@, yfeldblum, darshan, chalfant

FB internal diff: D2124497

Tasks: 7306976

Signature: t1:2124497:1433368083:1097dc22734dacad59b30d4b721be111d021bb43

folly/io/IOBuf.cpp

index 07c784b4b49f8e143875e1a07740b84b03223bb4..7286f21df2bd98631017c819a0b9d41b371773b8 100644 (file)
@@ -723,7 +723,6 @@ void IOBuf::reserveSlow(uint64_t minHeadroom, uint64_t minTailroom) {
           if (xallocx(p, newAllocatedCapacity, 0, 0) == newAllocatedCapacity) {
             newBuffer = static_cast<uint8_t*>(p);
             newHeadroom = oldHeadroom;
-            newAllocatedCapacity = newAllocatedCapacity;
           }
           // if xallocx failed, do nothing, fall back to malloc/memcpy/free
         }