mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-21 17:47:10 +00:00
parser: constify and pass by reference unchanged value
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
parent
cb0d66d55a
commit
05458768cf
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user