svn rev #21951: trunk/src/lib/krb5/ccache/
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue Feb 10 13:25:17 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21951
Commit By: ghudson
Log Message:
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.
Changed Files:
U trunk/src/lib/krb5/ccache/ser_cc.c
Modified: trunk/src/lib/krb5/ccache/ser_cc.c
===================================================================
--- trunk/src/lib/krb5/ccache/ser_cc.c 2009-02-10 17:17:39 UTC (rev 21950)
+++ trunk/src/lib/krb5/ccache/ser_cc.c 2009-02-10 18:25:15 UTC (rev 21951)
@@ -73,7 +73,7 @@
* 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 @@
(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
More information about the cvs-krb5
mailing list