initialize static string buffers to empty strings

This commit is contained in:
Axel Kohlmeyer
2024-01-19 00:02:50 -05:00
parent 3ae4779c7f
commit 4015d1bb39
31 changed files with 61 additions and 42 deletions

View File

@ -147,7 +147,7 @@ void AngleWrite::command(int narg, char **arg)
writer->input->one("mass * 1.0");
writer->input->one(fmt::format("angle_style {}", force->angle_style));
FILE *coeffs;
char line[MAXLINE];
char line[MAXLINE] = {'\0'};
coeffs = fopen(coeffs_file.c_str(), "r");
for (int i = 0; i < atom->nangletypes; ++i) {
fgets(line, MAXLINE, coeffs);