diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-11-16 20:27:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 20:27:59 +0100 |
commit | eba317d7a907a76e6e265c0fe0b97a87f17cf943 (patch) | |
tree | 21edca825d0de28a4024c969e26ecfe75f6dc298 /src/nvim/quickfix.c | |
parent | 99211b008c10561560e84eabfaa22e1577ac179a (diff) | |
download | rneovim-eba317d7a907a76e6e265c0fe0b97a87f17cf943.tar.gz rneovim-eba317d7a907a76e6e265c0fe0b97a87f17cf943.tar.bz2 rneovim-eba317d7a907a76e6e265c0fe0b97a87f17cf943.zip |
refactor: reduce number of explicit char casts (#16077)
* refactor: reduce number of explicit char casts
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 950d187ad5..bf9052de6f 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -1183,7 +1183,7 @@ static void qf_store_title(qf_list_T *qfl, const char_u *title) char_u *p = xmallocz(len); qfl->qf_title = p; - xstrlcpy((char *)p, (const char *)title, len + 1); + STRLCPY(p, title, len + 1); } } @@ -1402,7 +1402,7 @@ static int qf_parse_fmt_s(regmatch_T *rmp, int midx, qffields_T *fields) len = CMDBUFFSIZE - 5; } STRCPY(fields->pattern, "^\\V"); - xstrlcat((char *)fields->pattern, (char *)rmp->startp[midx], len + 4); + STRLCAT(fields->pattern, rmp->startp[midx], len + 4); fields->pattern[len + 3] = '\\'; fields->pattern[len + 4] = '$'; fields->pattern[len + 5] = NUL; @@ -1424,7 +1424,7 @@ static int qf_parse_fmt_o(regmatch_T *rmp, int midx, qffields_T *fields) if (dsize > CMDBUFFSIZE) { dsize = CMDBUFFSIZE; } - xstrlcat((char *)fields->module, (char *)rmp->startp[midx], dsize); + STRLCAT(fields->module, rmp->startp[midx], dsize); return QF_OK; } @@ -3231,7 +3231,7 @@ static void qf_msg(qf_info_T *qi, int which, char *lead) memset(buf + len, ' ', 34 - len); buf[34] = NUL; } - xstrlcat((char *)buf, title, IOSIZE); + STRLCAT(buf, title, IOSIZE); } trunc_string(buf, buf, Columns - 1, IOSIZE); msg((char *)buf); |