summaryrefslogtreecommitdiff
path: root/logd/LogBufferTest.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2020-06-10 14:52:46 -0700
committerTom Cherry <tomcherry@google.com>2020-06-11 07:59:01 -0700
commita863b1a04b972ed41fc99fb657e3f3fbbf7bb43a (patch)
tree1740a3affb7f197cb8fd3b77dec7c96cc39b08c2 /logd/LogBufferTest.cpp
parent71de690f602f8c491024b9eef8022298aac9de52 (diff)
logd: simplify Clear() + Prune() logic
Clear() and Prune() return a boolean indicating whether or not their operations failed because the log buffer was 'busy'. This means that they return false upon success and true upon failure, which is not intuitive. This change inverts their return value to simply be true if they were successful or false otherwise. It also simplifies the return value of ChattyLogBuffer::Prune() to true if the requested number of rows have been pruned or if all rows in the log buffer have been pruned, and otherwise return false. Test: logging unit tests Test: clearing works even under logging pressure Change-Id: I346bb945496ef62bf8e973298f81c5163f49bc57
Diffstat (limited to 'logd/LogBufferTest.cpp')
0 files changed, 0 insertions, 0 deletions