Fix return code for ended iteration.

The API promises a return code of -1 for an
ended iteration and lower negative values for
errors.

Change-Id: I688a1ee2efad1bdfc6959cf27e49c0426ebf27f8
1 file changed