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

fix elusive uninitialized data bug reported by valgrind

(cherry picked from commit b44492ee05abc9a52180c73614d8876772bc4b41)
parent 3cf6715d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ FixBalance::FixBalance(LAMMPS *lmp, int narg, char **arg) :
  int outarg = 0;
  fp = NULL;
  last_clock = 0.0;
  clock_factor = -1.0;

  while (iarg < narg) {
    if (strcmp(arg[iarg],"out") == 0) {
@@ -229,6 +230,7 @@ void FixBalance::pre_exchange()

  // return if imbalance < threshhold

  if (clock_factor > 0.0)
    last_clock = balance->imbalance_clock(clock_factor,last_clock);
  imbnow = balance->imbalance_nlocal(maxperproc);
  if (imbnow <= thresh) {