aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/strings.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-01-23 21:50:41 +0100
committerGitHub <noreply@github.com>2017-01-23 21:50:41 +0100
commit5892aab1b54b115cc3e74cb0ac59b0034627bf4e (patch)
tree974ccd5d14bb258403f3ec274ac93e8dfd651ca6 /src/nvim/strings.c
parentd4b931deacf61528e902623d38d0f4d314bc1839 (diff)
parentb70a5cdd49ecd5f3fe749c1c66a169fee828c66e (diff)
downloadrneovim-5892aab1b54b115cc3e74cb0ac59b0034627bf4e.tar.gz
rneovim-5892aab1b54b115cc3e74cb0ac59b0034627bf4e.tar.bz2
rneovim-5892aab1b54b115cc3e74cb0ac59b0034627bf4e.zip
Merge #5996 from justinmk/coverity-133845
xstrlcat() + coverity fixes
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r--src/nvim/strings.c18
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.