From 241a5e70b94f4312ba76199631f5931504bd2a57 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 4 Dec 2009 14:58:10 +0000 Subject: [PATCH] Remove some code paths in crypto-length which are dead now that the internal interface can't return an error. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23446 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/krb/crypto_length.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/lib/crypto/krb/crypto_length.c b/src/lib/crypto/krb/crypto_length.c index 91593ce74..3b0a9ac7f 100644 --- a/src/lib/crypto/krb/crypto_length.c +++ b/src/lib/crypto/krb/crypto_length.c @@ -34,7 +34,6 @@ krb5_c_crypto_length(krb5_context context, krb5_enctype enctype, krb5_cryptotype type, unsigned int *size) { const struct krb5_keytypes *ktp; - krb5_error_code ret = 0; ktp = find_enctype(enctype); if (ktp == NULL) @@ -55,11 +54,10 @@ krb5_c_crypto_length(krb5_context context, krb5_enctype enctype, *size = ktp->crypto_length(ktp, type); break; default: - ret = EINVAL; - break; + return EINVAL; } - return ret; + return 0; } krb5_error_code KRB5_CALLCONV @@ -80,7 +78,6 @@ krb5_error_code KRB5_CALLCONV krb5_c_crypto_length_iov(krb5_context context, krb5_enctype enctype, krb5_crypto_iov *data, size_t num_data) { - krb5_error_code ret = 0; size_t i; const struct krb5_keytypes *ktp; unsigned int data_length = 0, pad_length; @@ -118,14 +115,8 @@ krb5_c_crypto_length_iov(krb5_context context, krb5_enctype enctype, default: break; } - - if (ret != 0) - break; } - if (ret != 0) - return ret; - pad_length = krb5int_c_padding_length(ktp, data_length); if (pad_length != 0 && padding == NULL) return EINVAL; -- 2.26.2