From 8a384df5c38aa75c51cc0a908f0797dbd1852145 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 27 Mar 2019 06:19:42 -0400 Subject: [PATCH] use utils::strmatch() instead of strncmp() --- src/modify.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modify.cpp b/src/modify.cpp index 0a03bb6804..7f43f035d2 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -28,6 +28,7 @@ #include "variable.h" #include "memory.h" #include "error.h" +#include "utils.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -1058,7 +1059,7 @@ int Modify::check_rigid_group_overlap(int groupbit) int n = 0; for (int ifix = 0; ifix < nfix; ifix++) { - if (strncmp("rigid",fix[ifix]->style,5) == 0) { + if (utils::strmatch(fix[ifix]->style,"^rigid")) { const int * const body = (const int *)fix[ifix]->extract("body",dim); if ((body == NULL) || (dim != 1)) break;