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:
committed by
Carlos R. Mafra
parent
05f88d0aa7
commit
5255c364b8
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user