svn rev #22195: trunk/src/lib/krb5/rcache/

epeisach@MIT.EDU epeisach at MIT.EDU
Sun Apr 12 10:59:09 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22195
Commit By: epeisach
Log Message:
ticket: 6453
subject: remove dead code

Remove some more dead code assignment - where the variable is
immediately assigned in the next statement - or not used at all.




Changed Files:
U   trunk/src/lib/krb5/rcache/rc_conv.c
U   trunk/src/lib/krb5/rcache/ser_rc.c
Modified: trunk/src/lib/krb5/rcache/rc_conv.c
===================================================================
--- trunk/src/lib/krb5/rcache/rc_conv.c	2009-04-12 14:09:29 UTC (rev 22194)
+++ trunk/src/lib/krb5/rcache/rc_conv.c	2009-04-12 14:59:08 UTC (rev 22195)
@@ -67,7 +67,7 @@
         krb5_free_checksum_contents(context, &cksum);
         return KRB5_RC_MALLOC;
     }
-    ptr = hash;
+
     for (i = 0, ptr = hash; i < cksum.length; i++, ptr += 2)
         snprintf(ptr, 3, "%02X", cksum.contents[i]);
     *ptr = '\0';

Modified: trunk/src/lib/krb5/rcache/ser_rc.c
===================================================================
--- trunk/src/lib/krb5/rcache/ser_rc.c	2009-04-12 14:09:29 UTC (rev 22194)
+++ trunk/src/lib/krb5/rcache/ser_rc.c	2009-04-12 14:59:08 UTC (rev 22195)
@@ -102,7 +102,6 @@
     krb5_octet          *bp;
     size_t              remain;
     char                *rcname;
-    size_t              namelen;
     char                *fnamep;
 
     required = 0;
@@ -116,11 +115,7 @@
             /* Our identifier */
             (void) krb5_ser_pack_int32(KV5M_RCACHE, &bp, &remain);
 
-            /* Calculate the length of the name */
-            namelen = (rcache->ops && rcache->ops->type) ?
-                strlen(rcache->ops->type)+1 : 0;
             fnamep = krb5_rc_get_name(kcontext, rcache);
-            namelen += (strlen(fnamep)+1);
 
             if (rcache->ops && rcache->ops->type) {
                 if (asprintf(&rcname, "%s:%s", rcache->ops->type, fnamep) < 0)
@@ -170,7 +165,6 @@
     if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
         ibuf = 0;
     if (ibuf == KV5M_RCACHE) {
-        kret = ENOMEM;
 
         /* Get the length of the rcache name */
         kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);




More information about the cvs-krb5 mailing list