From 904e5e66e6bdac1bff70a80d11b3192040059f4d Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 4 Jun 2001 15:23:41 +0000 Subject: [PATCH] * accept_sec_context.c (krb5_gss_accept_sec_context): Cleanup assignments in conditionals. * k5seal.c (make_seal_token_v1): Likewise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13260 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 6 ++++++ src/lib/gssapi/krb5/accept_sec_context.c | 11 ++++++----- src/lib/gssapi/krb5/k5seal.c | 3 ++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index ec3c4cf49..dae9eb155 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,9 @@ +2001-06-04 Ezra Peisach + + * accept_sec_context.c (krb5_gss_accept_sec_context): Cleanup + assignments in conditionals. + * k5seal.c (make_seal_token_v1): Likewise. + 2001-05-14 Ezra Peisach * wrap_size_limit.c (krb5_gss_wrap_size_limit): Get rid of unused diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index e028aa68c..b01e49fd2 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -363,8 +363,8 @@ krb5_gss_accept_sec_context(minor_status, context_handle, /* gss krb5 v1 */ /* stash this now, for later. */ - if (code = krb5_c_checksum_length(context, CKSUMTYPE_RSA_MD5, - &md5len)) { + code = krb5_c_checksum_length(context, CKSUMTYPE_RSA_MD5, &md5len); + if (code) { major_status = GSS_S_FAILURE; goto fail; } @@ -494,9 +494,10 @@ krb5_gss_accept_sec_context(minor_status, context_handle, /* store the delegated credential */ - if (code = rd_and_store_for_creds(context, &option, - (delegated_cred_handle) ? - &deleg_cred : NULL)) { + code = rd_and_store_for_creds(context, &option, + (delegated_cred_handle) ? + &deleg_cred : NULL); + if (code) { major_status = GSS_S_FAILURE; goto fail; } diff --git a/src/lib/gssapi/krb5/k5seal.c b/src/lib/gssapi/krb5/k5seal.c index ff46afad8..913802a05 100644 --- a/src/lib/gssapi/krb5/k5seal.c +++ b/src/lib/gssapi/krb5/k5seal.c @@ -166,7 +166,8 @@ make_seal_token_v1 (krb5_context context, abort (); } - if (code = krb5_c_checksum_length(context, md5cksum.checksum_type, &sumlen)) + code = krb5_c_checksum_length(context, md5cksum.checksum_type, &sumlen); + if (code) return(code); md5cksum.length = sumlen; -- 2.26.2