simplify using utils::strdup()

This commit is contained in:
Axel Kohlmeyer
2021-03-18 20:56:04 -04:00
parent 1710fb86d3
commit a5563e8d04
18 changed files with 47 additions and 135 deletions

View File

@ -67,9 +67,7 @@ FixController::FixController(LAMMPS *lmp, int narg, char **arg) :
// control variable arg
int n = strlen(arg[iarg]) + 1;
cvID = new char[n];
strcpy(cvID,arg[iarg]);
cvID = utils::strdup(arg[iarg]);
// error check