Replace most strdup with gmx_strdup
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / hackblock.c
index dc7b66a6ad79c31d5d919d9f89e32f5ec97871f5..4afed71dd2f8acacb6c88853956c9267cebaf6d6 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <string.h>
 #include "hackblock.h"
+#include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/math/vec.h"
 #include "names.h"
@@ -164,7 +165,7 @@ void clear_t_hack(t_hack *hack)
     }
 }
 
-#define safe_strdup(str) ((str != NULL) ? strdup(str) : NULL)
+#define safe_strdup(str) ((str != NULL) ? gmx_strdup(str) : NULL)
 
 static void copy_t_rbonded(t_rbonded *s, t_rbonded *d)
 {