diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-09 14:13:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 21:13:06 +0800 |
commit | 149209400383c673fdb4fdd1c9a7639139f17936 (patch) | |
tree | d2c4e5fa69fc302ec3050978a303f6a479f30291 /src/nvim/runtime.c | |
parent | fc2cd28547954e64ef429c83733f06fa3ee75d50 (diff) | |
download | rneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.gz rneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.bz2 rneovim-149209400383c673fdb4fdd1c9a7639139f17936.zip |
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
Diffstat (limited to 'src/nvim/runtime.c')
-rw-r--r-- | src/nvim/runtime.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c index d922a4d303..0e1fe67e4a 100644 --- a/src/nvim/runtime.c +++ b/src/nvim/runtime.c @@ -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); |