summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-02-10 18:25:15 +0000
committerGreg Hudson <ghudson@mit.edu>2009-02-10 18:25:15 +0000
commitdc8410d699a0cf9d1f0d47804ba0b4920cdf46ae (patch)
tree5114b5d3c43e76693dc9ff69fece0661226aa3e4 /src/lib
parent07f7b4b99d29da5f17d7a54340105586af855a04 (diff)
downloadkrb5-dc8410d699a0cf9d1f0d47804ba0b4920cdf46ae.tar.gz
krb5-dc8410d699a0cf9d1f0d47804ba0b4920cdf46ae.tar.xz
krb5-dc8410d699a0cf9d1f0d47804ba0b4920cdf46ae.zip
In the ccache serialization code, remove some unnecessary checks for
nullity of ccache->ops; we assume a valid ops pointer in neighboring parts of the code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21951 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/ccache/ser_cc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/krb5/ccache/ser_cc.c b/src/lib/krb5/ccache/ser_cc.c
index d2abf532d..88e6a137d 100644
--- a/src/lib/krb5/ccache/ser_cc.c
+++ b/src/lib/krb5/ccache/ser_cc.c
@@ -73,7 +73,7 @@ krb5_ccache_size(krb5_context kcontext, krb5_pointer arg, size_t *sizep)
* krb5_int32 for KV5M_CCACHE
*/
required = sizeof(krb5_int32) * 3;
- if (ccache->ops && ccache->ops->prefix)
+ if (ccache->ops->prefix)
required += (strlen(ccache->ops->prefix)+1);
/*
@@ -115,12 +115,11 @@ krb5_ccache_externalize(krb5_context kcontext, krb5_pointer arg, krb5_octet **bu
(void) krb5_ser_pack_int32(KV5M_CCACHE, &bp, &remain);
/* Calculate the length of the name */
- namelen = (ccache->ops && ccache->ops->prefix) ?
- strlen(ccache->ops->prefix)+1 : 0;
+ namelen = ccache->ops->prefix ? strlen(ccache->ops->prefix)+1 : 0;
fnamep = krb5_cc_get_name(kcontext, ccache);
namelen += (strlen(fnamep)+1);
- if (ccache->ops && ccache->ops->prefix) {
+ if (ccache->ops->prefix) {
if (asprintf(&ccname, "%s:%s", ccache->ops->prefix, fnamep) < 0)
ccname = NULL;
} else