tidy-up: drop stray casts for allocated pointers

Closes #21865
This commit is contained in:
Viktor Szakats 2026-06-05 01:23:06 +02:00
parent cb307544ad
commit 1b8f4dba28
No known key found for this signature in database
16 changed files with 22 additions and 32 deletions

View file

@ -1017,7 +1017,7 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
size_t realsize = size * nmemb;
struct MemoryStruct *mem = (struct MemoryStruct *)data;
mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1);
mem->memory = realloc(mem->memory, mem->size + realsize + 1);
if(mem->memory) {
memcpy(&(mem->memory[mem->size]), ptr, realsize);
mem->size += realsize;

View file

@ -99,9 +99,7 @@ static void curl_perform(int fd, short event, void *arg)
static struct curl_context *create_curl_context(curl_socket_t sockfd)
{
struct curl_context *context;
context = (struct curl_context *)malloc(sizeof(*context));
struct curl_context *context = malloc(sizeof(*context));
context->sockfd = sockfd;

View file

@ -58,9 +58,7 @@ struct curl_context {
static struct curl_context *create_curl_context(curl_socket_t sockfd,
struct datauv *uv)
{
struct curl_context *context;
context = (struct curl_context *)malloc(sizeof(*context));
struct curl_context *context = malloc(sizeof(*context));
context->sockfd = sockfd;
context->uv = uv;