clang-tidy: add missing and delete redundant parentheses

Reported by clang-tidy v22.1.0.

Ref: https://releases.llvm.org/22.1.0/tools/clang/tools/extra/docs/ReleaseNotes.html

Closes #20749
This commit is contained in:
Viktor Szakats 2026-02-26 21:36:59 +01:00
parent 8d28ac612b
commit f76a54f890
No known key found for this signature in database
6 changed files with 12 additions and 11 deletions

View file

@ -219,7 +219,7 @@ void *curl_dbg_malloc(size_t wantedsize, int line, const char *source)
/* alloc at least 64 bytes */
size = sizeof(struct memdebug) + wantedsize;
mem = (Curl_cmalloc)(size);
mem = Curl_cmalloc(size);
if(mem) {
mem->size = wantedsize;
}
@ -249,7 +249,7 @@ void *curl_dbg_calloc(size_t wanted_elements, size_t wanted_size,
user_size = wanted_size * wanted_elements;
size = sizeof(struct memdebug) + user_size;
mem = (Curl_ccalloc)(1, size);
mem = Curl_ccalloc(1, size);
if(mem)
mem->size = user_size;
@ -344,7 +344,7 @@ void *curl_dbg_realloc(void *ptr, size_t wantedsize,
# pragma warning(pop)
#endif
mem = (Curl_crealloc)(mem, size);
mem = Curl_crealloc(mem, size);
if(source)
curl_dbg_log_locked("MEM %s:%d realloc(%p, %zu) = %p\n",
source, line, (void *)ptr, wantedsize,
@ -380,7 +380,7 @@ void curl_dbg_free(void *ptr, int line, const char *source)
#endif
/* free for real */
(Curl_cfree)(mem);
Curl_cfree(mem);
}
}