simplify some more code by using utils::strdup()
This commit is contained in:
@ -40,10 +40,7 @@ ImbalanceVar::~ImbalanceVar()
|
||||
int ImbalanceVar::options(int narg, char **arg)
|
||||
{
|
||||
if (narg < 1) error->all(FLERR,"Illegal balance weight command");
|
||||
|
||||
int len = strlen(arg[0]) + 1;
|
||||
name = new char[len];
|
||||
memcpy(name,arg[0],len);
|
||||
name = utils::strdup(arg[0]);
|
||||
init(0);
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user