(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)

This commit is contained in:
rubidium
2014-04-25 15:40:32 +00:00
parent 4227f495c5
commit 9ed12b0f07
70 changed files with 207 additions and 183 deletions

View File

@@ -49,7 +49,7 @@ IniItem::~IniItem()
void IniItem::SetValue(const char *value)
{
free(this->value);
this->value = strdup(value);
this->value = stredup(value);
}
/**
@@ -168,7 +168,7 @@ IniGroup *IniLoadFile::GetGroup(const char *name, size_t len, bool create_new)
/* otherwise make a new one */
IniGroup *group = new IniGroup(this, name, name + len - 1);
group->comment = strdup("\n");
group->comment = stredup("\n");
return group;
}