mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 09:08:25 +00:00
[HUST CSE] add forced type conversion when using 'realloc','malloc','calloc' for better readability
This commit is contained in:
@@ -58,7 +58,7 @@ char * str_accumulate(const char * s)
|
||||
accu = (char *) pthread_getspecific(str_key);
|
||||
/* It's initially NULL, meaning that we must allocate the buffer first. */
|
||||
if (accu == NULL) {
|
||||
accu = malloc(1024);
|
||||
accu = (char *)malloc(1024);
|
||||
if (accu == NULL) return NULL;
|
||||
accu[0] = 0;
|
||||
/* Store the buffer pointer in the thread-specific data. */
|
||||
|
||||
Reference in New Issue
Block a user