CONTRIB-4245 :: Notice: Undefined variable: resid

Signed-off-by: Joseph Rézeau <moodle@rezeau.org>