pam_krb5: Clarify a loop condition.

The closing parenthesis was in the wrong location, so instead of assigning the return value to krbret and then comparing it to zero, we were assigning the result of the comparison to krbret and then comparing that to zero.  This has no practical significance since the value is not used after the loop terminates.

PR:		229719
Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D41299
This commit is contained in:
Dag-Erling Smørgrav 2023-08-04 16:08:21 +00:00
parent 8e4aa6317e
commit acc7cf8641

View File

@ -576,8 +576,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags,
PAM_LOG("Prepared for iteration");
/* Copy the creds (should be two of them) */
while ((krbret = krb5_cc_next_cred(pam_context, ccache_temp,
&cursor, &creds) == 0)) {
while (krb5_cc_next_cred(pam_context, ccache_temp, &cursor, &creds) == 0) {
krbret = krb5_cc_store_cred(pam_context, ccache_perm, &creds);
if (krbret != 0) {
PAM_LOG_KRB5_ERR(pam_context, krbret,