mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
minor cleanup for static analyser
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32514 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0d5c7cb77c
commit
b918c226f7
2 changed files with 13 additions and 2 deletions
|
@ -148,8 +148,12 @@ static BOOL cacheDone = NO;
|
|||
|
||||
static char * xml_strdup(const char *from)
|
||||
{
|
||||
unsigned len = (from == 0) ? 1 : (strlen(from) + 1);
|
||||
char *to = malloc(len);
|
||||
unsigned len;
|
||||
char *to;
|
||||
|
||||
if (0 == from) from = "";
|
||||
len = strlen(from) + 1;
|
||||
to = malloc(len);
|
||||
memcpy(to, from, len);
|
||||
return to;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue