krb5: Fix error condition

‘ret’ can only ever be equal to zero.

Found by Coverity (Samba CID 1518754).

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Joseph Sutton
2023-10-06 13:07:21 +13:00
committed by Nico Williams
parent b1f7a63e41
commit 30e3921ad1

View File

@@ -968,7 +968,7 @@ krb5_ret_data(krb5_storage *sp,
bytes = sp->fetch(sp, data->data, size);
if (bytes < 0 || bytes != size) {
krb5_data_free(data);
return (ret < 0)? errno : sp->eof_code;
return (bytes < 0)? errno : sp->eof_code;
}
}
return 0;