fixed: reassignment before use of value

quells a sca warning
This commit is contained in:
Arne Morten Kvarving 2019-06-25 09:27:26 +02:00
parent 66394c870a
commit c826a709b1

View File

@ -565,9 +565,8 @@ wells_equal(const struct Wells *W1, const struct Wells *W2 , bool verbose)
return false;
}
bool are_equal = true;
are_equal = (W1->number_of_wells == W2->number_of_wells);
are_equal = are_equal && (W1->number_of_phases == W2->number_of_phases);
bool are_equal = (W1->number_of_wells == W2->number_of_wells) &&
(W1->number_of_phases == W2->number_of_phases);
if (!are_equal) {
return are_equal;
}