Skip to content

Commit 220bb2d

Browse files
committed
Fix shadowing error in mmap_data_loader.cpp
1 parent 18e4240 commit 220bb2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

extension/data_loader/mmap_data_loader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ Result<FreeableBuffer> MmapDataLoader::load(
181181
size_t size,
182182
ET_UNUSED const DataLoader::SegmentInfo& segment_info) const {
183183
// Ensure read range is valid.
184-
auto err = validate_input(offset, size);
185-
if (err != Error::Ok) {
186-
return err;
184+
auto validation_err = validate_input(offset, size);
185+
if (validation_err != Error::Ok) {
186+
return validation_err;
187187
}
188188

189189
// mmap() will fail if the size is zero.
@@ -225,7 +225,7 @@ Result<FreeableBuffer> MmapDataLoader::load(
225225

226226
if (mlock_config_ == MlockConfig::UseMlock ||
227227
mlock_config_ == MlockConfig::UseMlockIgnoreErrors) {
228-
int err = ::mlock(pages, size);
228+
auto err = ::mlock(pages, size);
229229
if (err < 0) {
230230
if (mlock_config_ == MlockConfig::UseMlockIgnoreErrors) {
231231
ET_LOG(

0 commit comments

Comments
 (0)