refactor: replace char_u with char 17 - remove STRLCPY (#21235)

refactor: replace char_u with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
dundargoc
2023-01-09 14:13:06 +01:00
committed by GitHub
parent fc2cd28547
commit 1492094003
43 changed files with 230 additions and 233 deletions

View File

@@ -654,8 +654,8 @@ static void expand_pack_entry(RuntimeSearchPath *search_path, Map(String, handle
if (pack_entry_len + strlen(start_pat[i]) + 1 > sizeof buf) {
continue;
}
STRLCPY(buf, pack_entry, sizeof buf);
STRLCPY(buf + pack_entry_len, start_pat[i], sizeof buf - pack_entry_len);
xstrlcpy(buf, pack_entry, sizeof buf);
xstrlcpy(buf + pack_entry_len, start_pat[i], sizeof buf - pack_entry_len);
expand_rtp_entry(search_path, rtp_used, buf, false);
size_t after_size = strlen(buf) + 7;
char *after = xmallocz(after_size);
@@ -1085,7 +1085,7 @@ static void add_pack_start_dir(char *fname, void *cookie)
if (strlen(fname) + strlen(start_pat[i]) + 1 > MAXPATHL) {
continue;
}
STRLCPY(buf, fname, MAXPATHL);
xstrlcpy(buf, fname, MAXPATHL);
xstrlcat(buf, start_pat[i], sizeof buf);
if (pack_has_entries(buf)) {
add_pack_dir_to_rtp(buf, true);