diff options
author | Ken Raeburn <raeburn@mit.edu> | 2002-02-23 03:23:58 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2002-02-23 03:23:58 +0000 |
commit | 10dd96d4848e3fd53ed98b562fbd4a4f7099efe0 (patch) | |
tree | 4b58b190ca86a2796a1ec473b8a766f4eb58ab0f /src/lib | |
parent | 6c6ba503a75ded60735f982b20013b0d2cfbff8c (diff) | |
download | krb5-10dd96d4848e3fd53ed98b562fbd4a4f7099efe0.zip krb5-10dd96d4848e3fd53ed98b562fbd4a4f7099efe0.tar.gz krb5-10dd96d4848e3fd53ed98b562fbd4a4f7099efe0.tar.bz2 |
Use const instead of krb5_const.
Use stdarg always, never varargs.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14162 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/krb5/keytab/ChangeLog | 4 | ||||
-rw-r--r-- | src/lib/krb5/keytab/ktbase.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/ChangeLog | 8 | ||||
-rw-r--r-- | src/lib/krb5/krb/addr_comp.c | 4 | ||||
-rw-r--r-- | src/lib/krb5/krb/addr_order.c | 4 | ||||
-rw-r--r-- | src/lib/krb5/krb/addr_srch.c | 4 | ||||
-rw-r--r-- | src/lib/krb5/krb/bld_pr_ext.c | 24 | ||||
-rw-r--r-- | src/lib/krb5/krb/bld_princ.c | 21 | ||||
-rw-r--r-- | src/lib/krb5/krb/enc_helper.c | 4 | ||||
-rw-r--r-- | src/lib/krb5/krb/encrypt_tk.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/gen_seqnum.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/gen_subkey.c | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/preauth.c | 8 |
13 files changed, 32 insertions, 57 deletions
diff --git a/src/lib/krb5/keytab/ChangeLog b/src/lib/krb5/keytab/ChangeLog index 2ec945b..92231b8 100644 --- a/src/lib/krb5/keytab/ChangeLog +++ b/src/lib/krb5/keytab/ChangeLog @@ -1,3 +1,7 @@ +2002-02-22 Ken Raeburn <raeburn@mit.edu> + + * ktbase.c (krb5_kt_resolve): Use const instead of krb5_const. + 2001-10-15 Danilo Almeida <dalmeida@mit.edu> * ktfns.c (krb5_kt_get_type): KRB5_CALLCONV. diff --git a/src/lib/krb5/keytab/ktbase.c b/src/lib/krb5/keytab/ktbase.c index 5f03e61..04f07cd 100644 --- a/src/lib/krb5/keytab/ktbase.c +++ b/src/lib/krb5/keytab/ktbase.c @@ -84,7 +84,7 @@ krb5_kt_register(context, ops) krb5_error_code KRB5_CALLCONV krb5_kt_resolve (context, name, ktid) krb5_context context; - krb5_const char *name; + const char *name; krb5_keytab *ktid; { struct krb5_kt_typelist *tlist; diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index c999bfa..c884dbe 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,11 @@ +2002-02-22 Ken Raeburn <raeburn@mit.edu> + + * addr_comp.c, addr_order.c, addr_srch.c, bld_pr_ext.c, + bld_princ.c, enc_helper.c, encrypt_tk.c, gen_seqnum.c, + gen_subkey.c, preauth.c: Use const instead of krb5_const. + * bld_pr_ext.c, bld_princ.c: Always use stdarg macros and not + varargs. + 2002-01-08 Sam Hartman <hartmans@mit.edu> * gen_subkey.c (krb5_generate_subkey): Label entropy sources diff --git a/src/lib/krb5/krb/addr_comp.c b/src/lib/krb5/krb/addr_comp.c index 587bd5f..359e570 100644 --- a/src/lib/krb5/krb/addr_comp.c +++ b/src/lib/krb5/krb/addr_comp.c @@ -35,8 +35,8 @@ krb5_boolean krb5_address_compare(context, addr1, addr2) krb5_context context; - krb5_const krb5_address *addr1; - krb5_const krb5_address *addr2; + const krb5_address *addr1; + const krb5_address *addr2; { if (addr1->addrtype != addr2->addrtype) return(FALSE); diff --git a/src/lib/krb5/krb/addr_order.c b/src/lib/krb5/krb/addr_order.c index 800fa2b..3145f29 100644 --- a/src/lib/krb5/krb/addr_order.c +++ b/src/lib/krb5/krb/addr_order.c @@ -40,8 +40,8 @@ int krb5_address_order(context, addr1, addr2) krb5_context context; - register krb5_const krb5_address *addr1; - register krb5_const krb5_address *addr2; + const krb5_address *addr1; + const krb5_address *addr2; { int dir; register int i; diff --git a/src/lib/krb5/krb/addr_srch.c b/src/lib/krb5/krb/addr_srch.c index 25b5156..75da7d2 100644 --- a/src/lib/krb5/krb/addr_srch.c +++ b/src/lib/krb5/krb/addr_srch.c @@ -36,8 +36,8 @@ krb5_boolean krb5_address_search(context, addr, addrlist) krb5_context context; - krb5_const krb5_address *addr; - krb5_address * krb5_const * addrlist; + const krb5_address *addr; + krb5_address * const * addrlist; { if (!addrlist) return TRUE; diff --git a/src/lib/krb5/krb/bld_pr_ext.c b/src/lib/krb5/krb/bld_pr_ext.c index cc4d6b8..c1af726 100644 --- a/src/lib/krb5/krb/bld_pr_ext.c +++ b/src/lib/krb5/krb/bld_pr_ext.c @@ -29,23 +29,11 @@ #include "k5-int.h" -#ifdef HAVE_STDARG_H #include <stdarg.h> -#else -#include <varargs.h> -#endif krb5_error_code KRB5_CALLCONV_C -#ifdef HAVE_STDARG_H -krb5_build_principal_ext(krb5_context context, krb5_principal * princ, unsigned int rlen, krb5_const char * realm, ...) -#else -krb5_build_principal_ext(context, princ, rlen, realm, va_alist) - krb5_context context; - krb5_principal *princ; - unsigned int rlen; - krb5_const char *realm; - va_dcl -#endif +krb5_build_principal_ext(krb5_context context, krb5_principal * princ, + unsigned int rlen, const char * realm, ...) { va_list ap; register int i, count = 0; @@ -55,11 +43,7 @@ krb5_build_principal_ext(context, princ, rlen, realm, va_alist) krb5_data *princ_data; krb5_principal princ_ret; -#ifdef HAVE_STDARG_H va_start(ap, realm); -#else - va_start(ap); -#endif /* count up */ while (va_arg(ap, int) != 0) { (void)va_arg(ap, char *); /* pass one up */ @@ -92,11 +76,7 @@ krb5_build_principal_ext(context, princ, rlen, realm, va_alist) tmpdata[rlen] = 0; /* process rest of components */ -#ifdef HAVE_STDARG_H va_start(ap, realm); -#else - va_start(ap); -#endif for (i = 0; i < count; i++) { size = va_arg(ap, unsigned int); next = va_arg(ap, char *); diff --git a/src/lib/krb5/krb/bld_princ.c b/src/lib/krb5/krb/bld_princ.c index 0e3cd23..c5374f3 100644 --- a/src/lib/krb5/krb/bld_princ.c +++ b/src/lib/krb5/krb/bld_princ.c @@ -30,18 +30,14 @@ /* Need <krb5/k5-config.h> for HAVE_STDARG_H */ #include "k5-int.h" -#ifdef HAVE_STDARG_H #include <stdarg.h> -#else -#include <varargs.h> -#endif krb5_error_code krb5_build_principal_va(context, princ, rlen, realm, ap) krb5_context context; krb5_principal princ; unsigned int rlen; - krb5_const char *realm; + const char *realm; va_list ap; { register int i, count = 0; @@ -100,18 +96,9 @@ krb5_build_principal_va(context, princ, rlen, realm, ap) } krb5_error_code KRB5_CALLCONV_C -#ifdef HAVE_STDARG_H krb5_build_principal(krb5_context context, krb5_principal * princ, unsigned int rlen, - krb5_const char * realm, ...) -#else -krb5_build_principal(context, princ, rlen, realm, va_alist) - krb5_context context; - krb5_principal *princ; - unsigned int rlen; - krb5_const char *realm; - va_dcl -#endif + const char * realm, ...) { va_list ap; krb5_error_code retval; @@ -120,11 +107,7 @@ krb5_build_principal(context, princ, rlen, realm, va_alist) if (!pr_ret) return ENOMEM; -#ifdef HAVE_STDARG_H va_start(ap, realm); -#else - va_start(ap); -#endif retval = krb5_build_principal_va(context, pr_ret, rlen, realm, ap); va_end(ap); if (retval == 0) diff --git a/src/lib/krb5/krb/enc_helper.c b/src/lib/krb5/krb/enc_helper.c index c40d9e2..2e4bb3c 100644 --- a/src/lib/krb5/krb/enc_helper.c +++ b/src/lib/krb5/krb/enc_helper.c @@ -29,9 +29,9 @@ krb5_error_code krb5_encrypt_helper(context, key, usage, plain, cipher) krb5_context context; - krb5_const krb5_keyblock *key; + const krb5_keyblock *key; krb5_keyusage usage; - krb5_const krb5_data *plain; + const krb5_data *plain; krb5_enc_data *cipher; { krb5_error_code ret; diff --git a/src/lib/krb5/krb/encrypt_tk.c b/src/lib/krb5/krb/encrypt_tk.c index 6b7c94b..07642f0 100644 --- a/src/lib/krb5/krb/encrypt_tk.c +++ b/src/lib/krb5/krb/encrypt_tk.c @@ -44,7 +44,7 @@ krb5_error_code krb5_encrypt_tkt_part(context, srv_key, dec_ticket) krb5_context context; - krb5_const krb5_keyblock *srv_key; + const krb5_keyblock *srv_key; register krb5_ticket *dec_ticket; { krb5_data *scratch; diff --git a/src/lib/krb5/krb/gen_seqnum.c b/src/lib/krb5/krb/gen_seqnum.c index 3c075a3..75afb7e 100644 --- a/src/lib/krb5/krb/gen_seqnum.c +++ b/src/lib/krb5/krb/gen_seqnum.c @@ -38,7 +38,7 @@ krb5_error_code krb5_generate_seq_number(context, key, seqno) krb5_context context; - krb5_const krb5_keyblock *key; + const krb5_keyblock *key; krb5_int32 *seqno; { krb5_data seed; diff --git a/src/lib/krb5/krb/gen_subkey.c b/src/lib/krb5/krb/gen_subkey.c index 6144e34..90e3302 100644 --- a/src/lib/krb5/krb/gen_subkey.c +++ b/src/lib/krb5/krb/gen_subkey.c @@ -32,7 +32,7 @@ krb5_error_code krb5_generate_subkey(context, key, subkey) krb5_context context; - krb5_const krb5_keyblock *key; + const krb5_keyblock *key; krb5_keyblock **subkey; { krb5_error_code retval; diff --git a/src/lib/krb5/krb/preauth.c b/src/lib/krb5/krb/preauth.c index 730d25c..a163c97 100644 --- a/src/lib/krb5/krb/preauth.c +++ b/src/lib/krb5/krb/preauth.c @@ -40,7 +40,7 @@ static krb5_error_code obtain_enc_ts_padata krb5_etype_info, krb5_keyblock *, krb5_error_code ( * )(krb5_context, - krb5_const krb5_enctype, + const krb5_enctype, krb5_data *, krb5_const_pointer, krb5_keyblock **), @@ -55,13 +55,13 @@ static krb5_error_code process_pw_salt krb5_kdc_req *, krb5_kdc_rep *, krb5_error_code ( * )(krb5_context, - krb5_const krb5_enctype, + const krb5_enctype, krb5_data *, krb5_const_pointer, krb5_keyblock **), krb5_const_pointer, krb5_error_code ( * )(krb5_context, - krb5_const krb5_keyblock *, + const krb5_keyblock *, krb5_const_pointer, krb5_kdc_rep * ), krb5_keyblock **, @@ -75,7 +75,7 @@ static krb5_error_code obtain_sam_padata krb5_etype_info, krb5_keyblock *, krb5_error_code ( * )(krb5_context, - krb5_const krb5_enctype, + const krb5_enctype, krb5_data *, krb5_const_pointer, krb5_keyblock **), |