From f59cb07621aa7318697be376f423c6ed3af90eea Mon Sep 17 00:00:00 2001 From: John Kohl Date: Wed, 3 Jan 1990 15:10:39 +0000 Subject: [PATCH] add lint casts normalize routine names git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@65 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/asn1glue.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/asn.1/asn1glue.h b/src/lib/krb5/asn.1/asn1glue.h index 2130e5ddc..8e433b458 100644 --- a/src/lib/krb5/asn.1/asn1glue.h +++ b/src/lib/krb5/asn.1/asn1glue.h @@ -18,14 +18,22 @@ #define krb5_string2qbuf(val) str2qb((val)->string, (val)->length, 1) -#define kdcoptions2KRB5_KDCOptions(val) (struct type_KRB5_KDCOptions *)flags2KRB5_TicketFlags(val) -#define KRB5_KDCOptions2kdcoptions(val) KRB5_TicketFlags2flags((struct type_KRB5_TicketFlags *) (val)) -#define apoptions2KRB5_APOptions(val) (struct type_KRB5_APOptions *)flags2KRB5_TicketFlags(val) -#define KRB5_APOptions2apoptions(val) KRB5_TicketFlags2flags((struct type_KRB5_APOptions *) (val)) +#define krb5_kdcoptions2KRB5_KDCOptions(val, err) (struct type_KRB5_KDCOptions *)krb5_flags2KRB5_TicketFlags(val, err) +#define KRB5_KDCOptions2krb5_kdcoptions(val, err) KRB5_TicketFlags2krb5_flags((struct type_KRB5_TicketFlags *) (val), err) +#define krb5_apoptions2KRB5_APOptions(val, err) (struct type_KRB5_APOptions *)krb5_flags2KRB5_TicketFlags(val, err) +#define KRB5_APOptions2krb5_apoptions(val, err) KRB5_TicketFlags2krb5_flags((struct type_KRB5_APOptions *) (val), err) -#define free_krb5_string(val) { free((val)->string); free(val);} +#define free_krb5_string(val) { xfree((val)->string); xfree(val);} -#define free_krb5_ap_rep_enc_part free -#define free_krb5_checksum free +#define free_krb5_ap_rep_enc_part xfree +#define free_krb5_checksum xfree +#define free_krb5_keyblock xfree + +/* to keep lint happy */ +#define xfree(val) free((char *)(val)) +#define xbcopy(src,dst,size) bcopy((char *)(src), (char *)(dst), size) +#define xbzero(targ, size) bzero((char *)(targ), size) +#define xmalloc(n) malloc((unsigned) (n)) +#define xcalloc(n,s) calloc((unsigned)(n), (unsigned)(s)) #endif /* __KRB5_GLUE_H__ */ -- 2.26.2