summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/krb
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-03-09 18:30:31 +0000
committerGreg Hudson <ghudson@mit.edu>2012-03-09 18:30:31 +0000
commit221cd4a23691601a14500bc00146c265b50bdc94 (patch)
treee54d818ccf2abb3956881ffb6281f75bb48122eb /src/lib/crypto/krb
parent0e5252ec1778d3421122f2ee95c88e8b1b77e383 (diff)
downloadkrb5-221cd4a23691601a14500bc00146c265b50bdc94.tar.gz
krb5-221cd4a23691601a14500bc00146c265b50bdc94.tar.xz
krb5-221cd4a23691601a14500bc00146c265b50bdc94.zip
Avoid side effects in assert expressions
asserts may be compiled out with -DNDEBUG, so it's wrong to use an assert expression with an important side effect. (We also have scores of side-effecting asserts in test programs, but those are less important and can be dealt with separately.) ticket: 7105 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25760 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/krb')
-rw-r--r--src/lib/crypto/krb/cf2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/crypto/krb/cf2.c b/src/lib/crypto/krb/cf2.c
index 5f82d62af..7334ed168 100644
--- a/src/lib/crypto/krb/cf2.c
+++ b/src/lib/crypto/krb/cf2.c
@@ -107,7 +107,8 @@ krb5_c_fx_cf2_simple(krb5_context context,
return KRB5_BAD_ENCTYPE;
out_enctype_num = k1->enctype;
assert(out != NULL);
- assert((out_enctype = find_enctype(out_enctype_num)) != NULL);
+ out_enctype = find_enctype(out_enctype_num);
+ assert(out_enctype != NULL);
if (out_enctype->prf == NULL) {
if (context)
krb5int_set_error(&(context->err), KRB5_CRYPTO_INTERNAL,