* libltdl/ltdl.c (strdup): cannot return str when it's NULL

because of const correctness
This commit is contained in:
Alexandre Oliva 1999-03-11 03:14:54 +00:00 committed by Alexandre Oliva
parent b96c596a21
commit 50b30fa4d5
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
1999-03-11 Alexandre Oliva <oliva@dcc.unicamp.br>
* libltdl/ltdl.c (strdup): cannot return str when it's NULL
because of const correctness
1999-03-10 Alexandre Oliva <oliva@dcc.unicamp.br>
* libltdl/ltdl.c (strdup): always use our own, because the

View File

@ -136,7 +136,7 @@ strdup(str)
char *tmp;
if (!str)
return str;
return 0;
tmp = (char*) lt_dlmalloc(strlen(str)+1);
if (tmp)
strcpy(tmp, str);