Bug 229719 - src/lib/libpam/modules/pam_krb5/pam_krb5.c:536]: (style) Suspicious condition
Summary: src/lib/libpam/modules/pam_krb5/pam_krb5.c:536]: (style) Suspicious condition
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-12 10:43 UTC by David Binderman
Modified: 2018-07-12 10:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2018-07-12 10:43:11 UTC
src/lib/libpam/modules/pam_krb5/pam_krb5.c:536]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

        while ((krbret = krb5_cc_next_cred(pam_context, ccache_temp,
                                &cursor, &creds) == 0)) {

Maybe better code

        while ((krbret = krb5_cc_next_cred(pam_context, ccache_temp,
                                &cursor, &creds)) == 0) {