From 2f93678ed8f7bd79c4d6de05dc5f3e3c24361c44 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 13 Jun 2018 15:44:07 +0200 Subject: [FUSE] Move variables into block where they're being used --- src/fuse/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fuse') diff --git a/src/fuse/main.c b/src/fuse/main.c index adf7b23..b064a9b 100644 --- a/src/fuse/main.c +++ b/src/fuse/main.c @@ -165,11 +165,11 @@ static int image_read(const char *path, char *buf, size_t size, off_t offset, st size = imageSize - offset; } - /* count the requested blocks */ - uint64_t startBlock = offset / ( 4096 ); - const uint64_t endBlock = ( offset + size - 1 ) / ( 4096 ); - if ( useDebug ) { + /* count the requested blocks */ + uint64_t startBlock = offset / ( 4096 ); + const uint64_t endBlock = ( offset + size - 1 ) / ( 4096 ); + for ( ; startBlock <= endBlock; startBlock++ ) { ++logInfo.blockRequestCount[startBlock]; } -- cgit v1.2.3-55-g7522