svn rev #22196: trunk/src/lib/krb5/keytab/
epeisach@MIT.EDU
epeisach at MIT.EDU
Sun Apr 12 11:40:41 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22196
Commit By: epeisach
Log Message:
ticket: 6453
status: open
More dead code elimination. When asprintf was used the varaible namelen was
no longer necessary.
Changed Files:
U trunk/src/lib/krb5/keytab/kt_file.c
Modified: trunk/src/lib/krb5/keytab/kt_file.c
===================================================================
--- trunk/src/lib/krb5/keytab/kt_file.c 2009-04-12 14:59:08 UTC (rev 22195)
+++ trunk/src/lib/krb5/keytab/kt_file.c 2009-04-12 15:40:41 UTC (rev 22196)
@@ -635,7 +635,6 @@
krb5_int32 file_is_open;
krb5_int64 file_pos;
char *ktname;
- size_t namelen;
const char *fnamep;
required = 0;
@@ -654,13 +653,10 @@
file_pos = 0;
/* Calculate the length of the name */
- namelen = (keytab->ops && keytab->ops->prefix) ?
- strlen(keytab->ops->prefix)+1 : 0;
if (ktdata && ktdata->name)
fnamep = ktdata->name;
else
fnamep = ktfile_def_name;
- namelen += (strlen(fnamep)+1);
if (keytab->ops && keytab->ops->prefix) {
if (asprintf(&ktname, "%s:%s", keytab->ops->prefix, fnamep) < 0)
@@ -743,7 +739,6 @@
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
ibuf = 0;
if (ibuf == KV5M_KEYTAB) {
- kret = ENOMEM;
/* Get the length of the keytab name */
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
More information about the cvs-krb5
mailing list