1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-08 23:04:15 +01:00

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 <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-05-18 00:56:39 +02:00
committed by Carlos R. Mafra
parent 05f88d0aa7
commit 5255c364b8

View File

@@ -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;
}