From: Ezra Peisach Date: Fri, 27 Jul 2001 01:52:30 +0000 (+0000) Subject: * kdb_xdr.c (krb5_dbe_update_mod_princ_data, X-Git-Tag: krb5-1.3-alpha1~1167 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d0e7dcdbb1e65e571c3345749d37aec46f6f3aa7;p=krb5.git * kdb_xdr.c (krb5_dbe_update_mod_princ_data, krb5_encode_princ_contents): Delcare local variable unsigned. * kdb_cpw.c (add_key_pwd): Declare local variable unsigned based on use. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13644 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index b862b23ce..2b52681df 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,11 @@ +2001-07-26 Ezra Peisach + + * kdb_xdr.c (krb5_dbe_update_mod_princ_data, + krb5_encode_princ_contents): Delcare local variable unsigned. + + * kdb_cpw.c (add_key_pwd): Declare local variable unsigned based + on use. + 2001-04-25 Ezra Peisach * kdb_dbm.c (destroy_file_suffix): Declare as static. diff --git a/src/lib/kdb/kdb_cpw.c b/src/lib/kdb/kdb_cpw.c index 01411e9af..4acf3112a 100644 --- a/src/lib/kdb/kdb_cpw.c +++ b/src/lib/kdb/kdb_cpw.c @@ -389,7 +389,8 @@ add_key_pwd(context, master_key, ks_tuple, ks_tuple_count, passwd, #else /* Why do we do this? Well, the afs_mit_string_to_key needs to use strlen, and the realm is not NULL terminated.... */ - int slen = (*krb5_princ_realm(context,db_entry->princ)).length; + unsigned int slen = + (*krb5_princ_realm(context,db_entry->princ)).length; if(!(key_salt.data.data = (char *) malloc(slen+1))) return ENOMEM; key_salt.data.data[slen] = 0; diff --git a/src/lib/kdb/kdb_xdr.c b/src/lib/kdb/kdb_xdr.c index 5573431c6..973730f64 100644 --- a/src/lib/kdb/kdb_xdr.c +++ b/src/lib/kdb/kdb_xdr.c @@ -181,13 +181,13 @@ krb5_dbe_update_mod_princ_data(context, entry, mod_date, mod_princ) krb5_error_code retval = 0; krb5_octet * nextloc = 0; char * unparse_mod_princ = 0; - int unparse_mod_princ_size; + unsigned int unparse_mod_princ_size; if ((retval = krb5_unparse_name(context, mod_princ, &unparse_mod_princ))) return(retval); - unparse_mod_princ_size = (int) strlen(unparse_mod_princ) + 1; + unparse_mod_princ_size = strlen(unparse_mod_princ) + 1; if ((nextloc = (krb5_octet *) malloc(unparse_mod_princ_size + 4)) == NULL) { @@ -275,7 +275,8 @@ krb5_encode_princ_contents(context, content, entry) krb5_data * content; krb5_db_entry * entry; { - int unparse_princ_size, i, j; + int i, j; + unsigned int unparse_princ_size; char * unparse_princ; char * nextloc; krb5_tl_data * tl_data;