refactor: strlcat instead of str{n}cat.

Add xstrlcat function.

Closes #3042
References #988
References #1069

coverity: 71530, 71531, 71532
This commit is contained in:
cztchoice
2015-07-18 17:27:05 +08:00
committed by Justin M. Keyes
parent d4b931deac
commit 6e75bb5cbb
7 changed files with 52 additions and 11 deletions

View File

@@ -269,6 +269,7 @@ enum {
#define STRCAT(d, s) strcat((char *)(d), (char *)(s))
#define STRNCAT(d, s, n) strncat((char *)(d), (char *)(s), (size_t)(n))
#define STRLCAT(d, s, n) xstrlcat((char *)(d), (char *)(s), (size_t)(n))
# define vim_strpbrk(s, cs) (char_u *)strpbrk((char *)(s), (char *)(cs))