From: Louis Brandy Date: Wed, 3 Jun 2015 21:24:26 +0000 (-0700) Subject: remove useless self-assignment in folly::iobuf X-Git-Tag: v0.43.0~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=26395e9b0dc250bf40f36334b32c8f4599f80a1b;p=folly.git remove useless self-assignment in folly::iobuf 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 --- diff --git a/folly/io/IOBuf.cpp b/folly/io/IOBuf.cpp index 07c784b4..7286f21d 100644 --- a/folly/io/IOBuf.cpp +++ b/folly/io/IOBuf.cpp @@ -723,7 +723,6 @@ void IOBuf::reserveSlow(uint64_t minHeadroom, uint64_t minTailroom) { if (xallocx(p, newAllocatedCapacity, 0, 0) == newAllocatedCapacity) { newBuffer = static_cast(p); newHeadroom = oldHeadroom; - newAllocatedCapacity = newAllocatedCapacity; } // if xallocx failed, do nothing, fall back to malloc/memcpy/free }