diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-01-23 14:34:47 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-01-23 15:49:37 +0100 |
commit | 7e799b6e910880d37e47c86ac46f12ce1c1c8a25 (patch) | |
tree | c226e6752ecbf97a2a42a42555b0fe8f79ec0439 /src/nvim/strings.c | |
parent | 6c467f3f7e71029c6ef4b8a18d8900ff51eb1174 (diff) | |
download | rneovim-7e799b6e910880d37e47c86ac46f12ce1c1c8a25.tar.gz rneovim-7e799b6e910880d37e47c86ac46f12ce1c1c8a25.tar.bz2 rneovim-7e799b6e910880d37e47c86ac46f12ce1c1c8a25.zip |
refactor: Replace vim_strcat() with xstrlcat().
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r-- | src/nvim/strings.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c index c1800a0639..5b4f23f30e 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -344,24 +344,6 @@ void del_trailing_spaces(char_u *ptr) *q = NUL; } -/* - * Like strcat(), but make sure the result fits in "tosize" bytes and is - * always NUL terminated. - */ -void vim_strcat(char_u *restrict to, const char_u *restrict from, - size_t tosize) - FUNC_ATTR_NONNULL_ALL -{ - size_t tolen = STRLEN(to); - size_t fromlen = STRLEN(from); - - if (tolen + fromlen + 1 > tosize) { - memcpy(to + tolen, from, tosize - tolen - 1); - to[tosize - 1] = NUL; - } else - STRCPY(to + tolen, from); -} - #if (!defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)) /* * Compare two strings, ignoring case, using current locale. |