From 5255c364b8404a05916069c584cb94d06b8e52a5 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 18 May 2014 00:56:39 +0200 Subject: [PATCH] WUtil: remove unnecessary check in wstrappend (Coverity #50138) The function wrealloc never fails, and allocates enough storage to store the resulting string, so it is useless to check if strcat failed. Signed-off-by: Christophe CURIS --- WINGs/string.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WINGs/string.c b/WINGs/string.c index 182d377e..5ec333e2 100644 --- a/WINGs/string.c +++ b/WINGs/string.c @@ -235,8 +235,7 @@ char *wstrappend(char *dst, const char *src) slen = strlen(dst) + strlen(src) + 1; dst = wrealloc(dst, slen); - if (wstrlcat(dst, src, slen) >= slen) - return NULL; + strcat(dst, src); return dst; } -- 2.11.4.GIT