Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fpetrini15 committed Oct 18, 2024
1 parent 4d11f04 commit 74d1887
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/backend_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ TritonBackend::LoadBackendLibrary(

RETURN_IF_ERROR(slib->OpenLibraryHandle(libpath_, &dlhandle_));

if (!original_path.empty()) {
if (!additional_dependency_dir_path.empty()) {
RETURN_IF_ERROR(slib->RemoveAdditionalDependencyDir(original_path));
}

Expand Down
4 changes: 2 additions & 2 deletions src/shared_library.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ SharedLibrary::AddAdditionalDependencyDir(
original_path.resize(len);
GetEnvironmentVariableW(PATH.c_str(), &original_path[0], len);
} else {
return Status(Status::Code::INTERNAL, "PATH variable is empty");
original_path = L"";
}

LOG_VERBOSE(1) << "Environment before extending PATH: "
Expand Down Expand Up @@ -298,7 +298,7 @@ SharedLibrary::AddAdditionalDependencyDir(
}

Status
SharedLibrary::RemoveAdditionalDependencyDir(std::wstring& original_path)
SharedLibrary::RemoveAdditionalDependencyDir(const std::wstring& original_path)
{
#ifdef _WIN32
const std::wstring PATH(L"Path");
Expand Down
2 changes: 1 addition & 1 deletion src/shared_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SharedLibrary {

// Restore PATH to its original configuration. Should be used in
// conjunction with AddAdditionalDependencyDir (Windows-only).
Status RemoveAdditionalDependencyDir(std::wstring& original_path);
Status RemoveAdditionalDependencyDir(const std::wstring& original_path);

private:
DISALLOW_COPY_AND_ASSIGN(SharedLibrary);
Expand Down

0 comments on commit 74d1887

Please sign in to comment.