Skip to content

Commit

Permalink
Rename variable for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Dec 4, 2024
1 parent f108999 commit 72a930c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/src/file_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ FileHandle::FileHandle(const std::string& file_path,
}

// Try to open the file with the O_DIRECT flag. Fall back to compatibility mode, if it fails.
auto handle_0_direct_except = [this] {
auto handle_o_direct_except = [this] {
if (_compat_mode == CompatMode::AUTO) {
_compat_mode = CompatMode::ON;
} else { // CompatMode::OFF
Expand All @@ -140,9 +140,9 @@ FileHandle::FileHandle(const std::string& file_path,
try {
_fd_direct_on = open_fd(file_path, flags, true, mode);
} catch (const std::system_error&) {
handle_0_direct_except();
handle_o_direct_except();
} catch (const std::invalid_argument&) {
handle_0_direct_except();
handle_o_direct_except();
}

if (_compat_mode == CompatMode::ON) { return; }
Expand Down

0 comments on commit 72a930c

Please sign in to comment.