2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 01:57:43 +00:00

parser: constify and pass by reference unchanged value

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia 2025-08-04 17:43:51 -03:00
parent cb0d66d55a
commit 05458768cf

View File

@ -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());