mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 05:05:33 +02:00
Correctly cast the result of malloc.
This commit is contained in:
parent
27c2433b9d
commit
411788d5de
1 changed files with 1 additions and 1 deletions
|
|
@ -9677,7 +9677,7 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input)
|
||||||
static int setenv(const char *name, const char *value, int overwrite)
|
static int setenv(const char *name, const char *value, int overwrite)
|
||||||
{
|
{
|
||||||
size_t buflen= strlen(name) + strlen(value) + 2;
|
size_t buflen= strlen(name) + strlen(value) + 2;
|
||||||
char *envvar= malloc(buflen);
|
char *envvar= (char *)malloc(buflen);
|
||||||
if(!envvar)
|
if(!envvar)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
strcpy(envvar, name);
|
strcpy(envvar, name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue