From c9ad5ffbca32b8454b3072fad184ab1e7cf93119 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Fri, 12 Oct 2018 17:05:49 -0700 Subject: manager: reduce scope of variable The lsess variable can have a smaller scope. Change-Id: I79aa84b25b52708c8c35ed1a56dbfe89dabd29fb Signed-off-by: Patrick Venture --- manager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manager.cpp b/manager.cpp index 32fdd74..a64300c 100644 --- a/manager.cpp +++ b/manager.cpp @@ -334,7 +334,6 @@ bool BlobManager::writeMeta(uint16_t session, uint32_t offset, bool BlobManager::getSession(uint16_t* sess) { uint16_t tries = 0; - uint16_t lsess; if (!sess) { @@ -348,7 +347,7 @@ bool BlobManager::getSession(uint16_t* sess) */ do { - lsess = next++; + uint16_t lsess = next++; if (!sessions.count(lsess)) { /* value not in use, return it. */ -- cgit v1.2.3