From ee8a14f067be4fb142f6952b3ee939ba66699b57 Mon Sep 17 00:00:00 2001 From: Dario Ackermann Date: Mon, 15 May 2023 18:30:12 +0200 Subject: [PATCH] cppcheck x2 --- src/s3fs_cred.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/s3fs_cred.cpp b/src/s3fs_cred.cpp index c15f6b1..4dedbbe 100644 --- a/src/s3fs_cred.cpp +++ b/src/s3fs_cred.cpp @@ -942,10 +942,9 @@ int S3fsCred::CheckSsoCacheKey(std::string& sso_cache_key){ S3FS_PRN_INFO("Use the profile %s to connect in s3", profile.c_str()); break; } - // Remove 'profile ' - std::string filter_line; std::size_t found = line.find(profile_prefix); if (found != std::string::npos){ + std::string filter_line; line.replace(found, profile_prefix.size(), filter_line); } profile = line.substr(1, line.size() - 2);