From d2001a492883f661dc5a71ed9fb2792278c404f0 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Wed, 20 Sep 1995 16:21:44 +0000 Subject: [PATCH] Declare cleanup function as void and propogate thoughout the file. This handles conflicts with free git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6812 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/ChangeLog | 5 +++++ src/lib/krb5/asn.1/krb5_decode.c | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index fad286a74..8995d09a7 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 20 11:50:35 1995 Ezra Peisach + + * krb5_decode.c (setup_buf_only): Declare cleanup routine as + void and propogate through file. + Mon Sep 18 14:17:15 1995 Theodore Y. Ts'o * asn1_encode.c (asn1_encode_generaltime): Don't modify a const diff --git a/src/lib/krb5/asn.1/krb5_decode.c b/src/lib/krb5/asn.1/krb5_decode.c index 377c0a2ae..cea8bdcdb 100644 --- a/src/lib/krb5/asn.1/krb5_decode.c +++ b/src/lib/krb5/asn.1/krb5_decode.c @@ -35,7 +35,7 @@ #define setup_buf_only(cr)\ asn1_error_code retval;\ asn1buf buf;\ -int (*error_cleanup)() = cr;\ +void (*error_cleanup)() = cr;\ \ retval = asn1buf_wrap_data(&buf,code);\ if(retval) return retval @@ -141,7 +141,8 @@ return 0 #define free_field(rep,f) if (rep->f) free(rep->f) #define clear_field(rep,f) (*rep)->f = 0 -static clean_krb5_authenticator(rep) + +static void clean_krb5_authenticator(rep) krb5_authenticator *rep; { free_field(rep,subkey); @@ -182,7 +183,7 @@ krb5_error_code decode_krb5_authenticator(code, rep) cleanup(); } -static clean_krb5_ticket(rep) +static void clean_krb5_ticket(rep) krb5_ticket *rep; { free_field(rep,server); @@ -228,7 +229,7 @@ krb5_error_code decode_krb5_encryption_key(code, rep) cleanup(); } -static clean_krb5_enc_tkt_part(rep) +static void clean_krb5_enc_tkt_part(rep) krb5_enc_tkt_part * rep; { free_field(rep,session); @@ -320,7 +321,7 @@ krb5_error_code decode_krb5_tgs_rep(code, rep) cleanup(); } -static clean_krb5_ap_req(rep) +static void clean_krb5_ap_req(rep) krb5_ap_req * rep; { free_field(rep,ticket); @@ -378,7 +379,7 @@ krb5_error_code decode_krb5_ap_rep(code, rep) cleanup(); } -static clean_krb5_ap_rep_enc_part(rep) +static void clean_krb5_ap_rep_enc_part(rep) krb5_ap_rep_enc_part * rep; { free_field(rep,subkey); @@ -452,7 +453,7 @@ krb5_error_code decode_krb5_kdc_req_body(code, rep) cleanup(); } -static clean_krb5_safe(rep) +static void clean_krb5_safe(rep) krb5_safe * rep; { free_field(rep,checksum); @@ -510,7 +511,7 @@ krb5_error_code decode_krb5_priv(code, rep) cleanup(); } -static clean_krb5_priv_enc_part(rep) +static void clean_krb5_priv_enc_part(rep) krb5_priv_enc_part * rep; { free_field(rep,r_address); @@ -567,7 +568,7 @@ krb5_error_code decode_krb5_cred(code, rep) cleanup(); } -static clean_krb5_cred_enc_part(rep) +static void clean_krb5_cred_enc_part(rep) krb5_cred_enc_part * rep; { free_field(rep,r_address); @@ -600,7 +601,7 @@ krb5_error_code decode_krb5_enc_cred_part(code, rep) } -static clean_krb5_error(rep) +static void clean_krb5_error(rep) krb5_error * rep; { free_field(rep,server); -- 2.26.2