Ensure no UB in writing forces
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 4 Feb 2021 08:26:29 +0000 (09:26 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 4 Feb 2021 08:29:05 +0000 (09:29 +0100)
commit07c3d8fc389fc33805ce2e77242b0013fb2459e0
treeb28324d34f7fe77837404656971abd7f766eb51c
parentc7d897cc24f5750850b466df9ca65501e173a52e
Ensure no UB in writing forces

UBSan observed that on non-master ranks we added an offset to a null
pointer in of->f_global. That pointer was never used, so there was no
bug, but we can improve the code by expressing that more clearly.

Ref #3897
src/gromacs/mdlib/mdoutf.cpp