summaryrefslogtreecommitdiff
path: root/libs/binder/RpcSession.cpp
diff options
context:
space:
mode:
author Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com> 2024-10-14 09:38:32 +0000
committer Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com> 2024-10-17 01:17:16 +0000
commit045a30e06207744f45d7defa109764a5565bf30e (patch)
tree089ae073800a0ecf123d2ac8002fac211a71a143 /libs/binder/RpcSession.cpp
parent0c01454656d28d34b9b24b0e647c4fc03356ca66 (diff)
NewBufferCount'value changed:simplifying the steps of applying for new buffers
In Commit:0a3e784, the calculation method of newBufferCount was modified from newBufferCount = mCore->mFreeSlots.size(); to newBufferCount = mCore->mFreeSlots.empty() ? 0 : 1;. When the value of newBufferCount is 0, it means that the maximum number of GB has been applied for. At this time, no new GB will be applied for and the code will be returned directly. The maximum value of newBufferCount is 1, and the subsequent steps of applying for a new buffer will only be executed once. So the for loop can be removed here to simplify the code. Change-Id: I6c72d7c9a672dc091bd462d384481bed5f88e226 Signed-off-by: Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com>
Diffstat (limited to 'libs/binder/RpcSession.cpp')
0 files changed, 0 insertions, 0 deletions