more replacing of sprintf() with snprintf()

This commit is contained in:
Axel Kohlmeyer
2018-09-06 10:45:48 -04:00
parent 4d52cb9245
commit 9c27548a5c
67 changed files with 168 additions and 185 deletions

View File

@ -232,7 +232,7 @@ FixGLE::FixGLE(LAMMPS *lmp, int narg, char **arg) :
fgle = force->open_potential(fname);
if (fgle == NULL) {
char str[128];
sprintf(str,"Cannot open A-matrix file %s",fname);
snprintf(str,128,"Cannot open A-matrix file %s",fname);
error->one(FLERR,str);
}
if (screen) fprintf(screen,"Reading A-matrix from %s\n", fname);
@ -302,7 +302,7 @@ FixGLE::FixGLE(LAMMPS *lmp, int narg, char **arg) :
fgle = force->open_potential(fname);
if (fgle == NULL) {
char str[128];
sprintf(str,"Cannot open C-matrix file %s",fname);
snprintf(str,128,"Cannot open C-matrix file %s",fname);
error->one(FLERR,str);
}
if (screen)