From 8e2acd0bcb76fabf4003bd4f1af92a54c8660d7b Mon Sep 17 00:00:00 2001 From: Richard Basch Date: Thu, 25 Apr 1996 12:50:49 +0000 Subject: [PATCH] Whitespace cleanup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7858 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/krshd.c | 14 ++++++-------- src/lib/krb5/os/sn2princ.c | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index 222e330aa..b3e265692 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -1205,10 +1205,8 @@ if(port) #endif /* Finish session in wmtp */ pty_logwtmp(ttyn,"",""); -if (ccache) - krb5_cc_destroy(bsd_context, ccache); - ccache = NULL; - + if (ccache) + krb5_cc_destroy(bsd_context, ccache); exit(0); } #if defined(HAVE_SETSID)&&(!defined(ULTRIX)) @@ -1369,8 +1367,8 @@ if (ccache) exit(1); signout_please: -if (ccache) - krb5_cc_destroy(bsd_context, ccache); + if (ccache) + krb5_cc_destroy(bsd_context, ccache); ccache = NULL; pty_logwtmp(ttyn,"",""); exit(1); @@ -1443,8 +1441,8 @@ krb5_sigtype pty_logwtmp(ttyn,"",""); syslog(LOG_INFO ,"Shell process completed."); -if (ccache) - krb5_cc_destroy(bsd_context, ccache); + if (ccache) + krb5_cc_destroy(bsd_context, ccache); exit(0); } diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c index 7971b123d..318b07403 100644 --- a/src/lib/krb5/os/sn2princ.c +++ b/src/lib/krb5/os/sn2princ.c @@ -101,17 +101,16 @@ krb5_sname_to_principal(context, hostname, sname, type, ret_princ) if (isupper(*cp)) *cp = tolower(*cp); - if (retval = krb5_get_host_realm(context, remote_host, &hrealms)) { - free(remote_host); - return retval; - } - if (!hrealms[0]) { - free(remote_host); - krb5_xfree(hrealms); - return KRB5_ERR_HOST_REALM_UNKNOWN; - } - realm = hrealms[0]; - + if (retval = krb5_get_host_realm(context, remote_host, &hrealms)) { + free(remote_host); + return retval; + } + if (!hrealms[0]) { + free(remote_host); + krb5_xfree(hrealms); + return KRB5_ERR_HOST_REALM_UNKNOWN; + } + realm = hrealms[0]; retval = krb5_build_principal(context, ret_princ, strlen(realm), realm, sname, remote_host, -- 2.26.2