client: fix bad shadowing of 'ret'