Use strcpy_literal for string literals

This commit is contained in:
twinaphex 2020-09-21 00:27:31 +02:00
parent 8811c555fe
commit f1d0de85fd
2 changed files with 2 additions and 3 deletions

View File

@ -4692,7 +4692,7 @@ static bool config_file_salamander_get_path(char *s, size_t len)
FILE_PATH_SALAMANDER_CONFIG,
len);
else
strlcpy(s, FILE_PATH_SALAMANDER_CONFIG, len);
strcpy_literal(s, FILE_PATH_SALAMANDER_CONFIG);
return !string_is_empty(s);
}

View File

@ -133,8 +133,7 @@ static void salamander_init(char *s, size_t len)
FILE_PATH_SALAMANDER_CONFIG,
sizeof(config_path));
else
strlcpy(config_path, FILE_PATH_SALAMANDER_CONFIG,
sizeof(config_path));
strcpy_literal(config_path, FILE_PATH_SALAMANDER_CONFIG);
/* Attempt to open config file */
config = config_file_new_from_path_to_string(config_path);