Commit a942d8b3 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

use memset() for clearing of arrays

parent 7a22b8aa
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1248,7 +1248,7 @@ void ReadData::bonds(int firstpass)
  int *count = NULL;
  if (firstpass) {
    memory->create(count,nlocal,"read_data:count");
    for (int i = 0; i < nlocal; i++) count[i] = 0;
    memset(count,0,nlocal*sizeof(int));
  }

  // read and process bonds
@@ -1331,7 +1331,7 @@ void ReadData::angles(int firstpass)
  int *count = NULL;
  if (firstpass) {
    memory->create(count,nlocal,"read_data:count");
    for (int i = 0; i < nlocal; i++) count[i] = 0;
    memset(count,0,nlocal*sizeof(int));
  }

  // read and process angles
@@ -1414,7 +1414,7 @@ void ReadData::dihedrals(int firstpass)
  int *count = NULL;
  if (firstpass) {
    memory->create(count,nlocal,"read_data:count");
    for (int i = 0; i < nlocal; i++) count[i] = 0;
    memset(count,0,nlocal*sizeof(int));
  }

  // read and process dihedrals
@@ -1497,7 +1497,7 @@ void ReadData::impropers(int firstpass)
  int *count = NULL;
  if (firstpass) {
    memory->create(count,nlocal,"read_data:count");
    for (int i = 0; i < nlocal; i++) count[i] = 0;
    memset(count,0,nlocal*sizeof(int));
  }

  // read and process impropers