From 49bf4c2bcfc59b4113c3b5ac2986baee668a1319 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 16 Feb 2017 00:25:11 +0200 Subject: 8219 mech_krb5: misleading-indentation Reviewed by: Yuri Pankov Reviewed by: Igor Kozhukhov Reviewed by: Richard Lowe Approved by: Gordon Ross --- usr/src/lib/gss_mechs/mech_krb5/krb5/krb/sendauth.c | 17 +++++++++-------- usr/src/lib/gss_mechs/mech_krb5/krb5/os/sendto_kdc.c | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/sendauth.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/sendauth.c index ef3324a9d2..433f7191de 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/sendauth.c +++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/sendauth.c @@ -77,14 +77,15 @@ krb5_sendauth(krb5_context context, krb5_auth_context *auth_context, krb5_pointe * Now, read back a byte: 0 means no error, 1 means bad sendauth * version, 2 means bad application version */ - if ((len = krb5_net_read(context, *((int *) fd), (char *)&result, 1)) != 1) - return((len < 0) ? errno : ECONNABORTED); - if (result == 1) - return(KRB5_SENDAUTH_BADAUTHVERS); - else if (result == 2) - return(KRB5_SENDAUTH_BADAPPLVERS); - else if (result != 0) - return(KRB5_SENDAUTH_BADRESPONSE); + len = krb5_net_read(context, *((int *) fd), (char *)&result, 1); + if (len != 1) + return((len < 0) ? errno : ECONNABORTED); + if (result == 1) + return(KRB5_SENDAUTH_BADAUTHVERS); + else if (result == 2) + return(KRB5_SENDAUTH_BADAPPLVERS); + else if (result != 0) + return(KRB5_SENDAUTH_BADRESPONSE); /* * We're finished with the initial negotiations; let's get and * send over the authentication header. (The AP_REQ message) diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/os/sendto_kdc.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/os/sendto_kdc.c index 87d1dce33a..2d36717023 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/krb5/os/sendto_kdc.c +++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/os/sendto_kdc.c @@ -1419,7 +1419,7 @@ krb5int_sendto (krb5_context context, const krb5_data *message, if (localaddr != 0 && localaddrlen != 0 && *localaddrlen > 0) (void) getsockname(conns[winning_conn].fd, localaddr, localaddrlen); - if (remoteaddr != 0 && remoteaddrlen != 0 && *remoteaddrlen > 0) + if (remoteaddr != 0 && remoteaddrlen != 0 && *remoteaddrlen > 0) (void) getpeername(conns[winning_conn].fd, remoteaddr, remoteaddrlen); egress: -- cgit v1.2.3