From aa3432229dff78dbbe95aeb0604215d3d588c4a4 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 10 Nov 2023 07:39:00 +0100 Subject: [PATCH] regtest: bug401284.c should never cast the return of malloc in C --- memcheck/tests/bug401284.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/bug401284.c b/memcheck/tests/bug401284.c index 704ed52f29..33151bed7d 100644 --- a/memcheck/tests/bug401284.c +++ b/memcheck/tests/bug401284.c @@ -5,7 +5,7 @@ int main(int argc, char* argv[]) { size_t len = strlen(argv[1]); - char* buf = (char*) malloc(2 * len + 1); + char* buf = malloc(2 * len + 1); memcpy(buf, argv[1], len + 1); strncat(buf + len, buf, len); printf("%s\n", buf); -- 2.47.2