You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2023/01/27 18:09:27 UTC
[trafficserver] branch leak_configfile created (now 19e13ae47)
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a change to branch leak_configfile
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
at 19e13ae47 Don't reassign the ats_scoped_str
This branch includes the following new commits:
new 19e13ae47 Don't reassign the ats_scoped_str
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[trafficserver] 01/01: Don't reassign the ats_scoped_str
Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch leak_configfile
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 19e13ae47075142b417da2a640a16013e11d95f9
Author: Bryan Call <bc...@apache.org>
AuthorDate: Fri Jan 27 10:09:10 2023 -0800
Don't reassign the ats_scoped_str
---
mgmt/config/AddConfigFilesHere.cc | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/mgmt/config/AddConfigFilesHere.cc b/mgmt/config/AddConfigFilesHere.cc
index 52042839c..40cc844c7 100644
--- a/mgmt/config/AddConfigFilesHere.cc
+++ b/mgmt/config/AddConfigFilesHere.cc
@@ -27,7 +27,6 @@
#include "tscore/Diags.h"
#include "FileManager.h"
#include "tscore/Errata.h"
-#include "tscore/ink_memory.h"
static constexpr bool REQUIRED{true};
static constexpr bool NOT_REQUIRED{false};
@@ -42,10 +41,7 @@ registerFile(const char *configName, const char *defaultName, bool isRequired)
{
bool found = false;
ats_scoped_str fname(REC_readString(configName, &found));
- if (!found) {
- fname = defaultName;
- }
- FileManager::instance().addFile(fname, configName, false, isRequired);
+ FileManager::instance().addFile(found ? fname : defaultName, configName, false, isRequired);
}
//