From 05458768cf27d5c166521762e5c1223dc6e47ab3 Mon Sep 17 00:00:00 2001 From: Georgia Garcia Date: Mon, 4 Aug 2025 17:43:51 -0300 Subject: [PATCH] parser: constify and pass by reference unchanged value Signed-off-by: Georgia Garcia --- parser/variable.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/variable.cc b/parser/variable.cc index 47dfd6e82..5f535d5f1 100644 --- a/parser/variable.cc +++ b/parser/variable.cc @@ -189,7 +189,7 @@ static void trim_trailing_slash(std::string& str) str.clear(); // str is all '/' } -int copy_value_to_name(std::string value, char **name) +int copy_value_to_name(const std::string& value, char **name) { free(*name); *name = strdup(value.c_str());