From 16217a6f509a900386f201e386fde1ecb9b316b0 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 3 Sep 2002 21:49:24 +0000 Subject: [PATCH] protoize git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14820 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ChangeLog | 6 + src/lib/krb5/ccache/cc_file.c | 216 +++++++------------------------- src/lib/krb5/ccache/cc_memory.c | 70 +++-------- src/lib/krb5/ccache/cc_retr.c | 36 ++---- src/lib/krb5/ccache/ccbase.c | 10 +- src/lib/krb5/ccache/cccopy.c | 5 +- src/lib/krb5/ccache/ccdefault.c | 8 +- src/lib/krb5/ccache/ser_cc.c | 20 +-- src/lib/krb5/ccache/t_cc.c | 19 +-- 9 files changed, 88 insertions(+), 302 deletions(-) diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog index f30edd734..3d7af5461 100644 --- a/src/lib/krb5/ccache/ChangeLog +++ b/src/lib/krb5/ccache/ChangeLog @@ -1,3 +1,9 @@ +2002-09-03 Ken Raeburn + + * cc_file.c, cc_memory.c, cc_retr.c, ccbase.c, cccopy.c, + ccdefault.c, ser_cc.c, t_cc.c: Use prototype style function + definitions. + 2002-08-29 Ken Raeburn * Makefile.in: Revert $(S)=>/ change, for Windows support. diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c index a46e83f0c..f2ebe1555 100644 --- a/src/lib/krb5/ccache/cc_file.c +++ b/src/lib/krb5/ccache/cc_file.c @@ -355,11 +355,7 @@ typedef struct _krb5_fcc_cursor { * system errors (read) */ static krb5_error_code -krb5_fcc_read(context, id, buf, len) - krb5_context context; - krb5_ccache id; - krb5_pointer buf; - unsigned int len; +krb5_fcc_read(krb5_context context, krb5_ccache id, krb5_pointer buf, unsigned int len) { int ret; @@ -402,10 +398,7 @@ krb5_fcc_read(context, id, buf, len) : (errno = ENOMEM,(TYPE *) 0)) static krb5_error_code -krb5_fcc_read_principal(context, id, princ) - krb5_context context; - krb5_ccache id; - krb5_principal *princ; +krb5_fcc_read_principal(krb5_context context, krb5_ccache id, krb5_principal *princ) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code kret; @@ -477,10 +470,7 @@ krb5_fcc_read_principal(context, id, princ) } static krb5_error_code -krb5_fcc_read_addrs(context, id, addrs) - krb5_context context; - krb5_ccache id; - krb5_address ***addrs; +krb5_fcc_read_addrs(krb5_context context, krb5_ccache id, krb5_address ***addrs) { krb5_error_code kret; krb5_int32 length; @@ -522,10 +512,7 @@ krb5_fcc_read_addrs(context, id, addrs) } static krb5_error_code -krb5_fcc_read_keyblock(context, id, keyblock) - krb5_context context; - krb5_ccache id; - krb5_keyblock *keyblock; +krb5_fcc_read_keyblock(krb5_context context, krb5_ccache id, krb5_keyblock *keyblock) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code kret; @@ -571,10 +558,7 @@ krb5_fcc_read_keyblock(context, id, keyblock) } static krb5_error_code -krb5_fcc_read_data(context, id, data) - krb5_context context; - krb5_ccache id; - krb5_data *data; +krb5_fcc_read_data(krb5_context context, krb5_ccache id, krb5_data *data) { krb5_error_code kret; krb5_int32 len; @@ -615,10 +599,7 @@ krb5_fcc_read_data(context, id, data) } static krb5_error_code -krb5_fcc_read_addr(context, id, addr) - krb5_context context; - krb5_ccache id; - krb5_address *addr; +krb5_fcc_read_addr(krb5_context context, krb5_ccache id, krb5_address *addr) { krb5_error_code kret; krb5_ui_2 ui2; @@ -659,10 +640,7 @@ krb5_fcc_read_addr(context, id, addr) } static krb5_error_code -krb5_fcc_read_int32(context, id, i) - krb5_context context; - krb5_ccache id; - krb5_int32 *i; +krb5_fcc_read_int32(krb5_context context, krb5_ccache id, krb5_int32 *i) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code retval; @@ -692,10 +670,7 @@ krb5_fcc_read_int32(context, id, i) } static krb5_error_code -krb5_fcc_read_ui_2(context, id, i) - krb5_context context; - krb5_ccache id; - krb5_ui_2 *i; +krb5_fcc_read_ui_2(krb5_context context, krb5_ccache id, krb5_ui_2 *i) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code retval; @@ -714,20 +689,14 @@ krb5_fcc_read_ui_2(context, id, i) } static krb5_error_code -krb5_fcc_read_octet(context, id, i) - krb5_context context; - krb5_ccache id; - krb5_octet *i; +krb5_fcc_read_octet(krb5_context context, krb5_ccache id, krb5_octet *i) { return krb5_fcc_read(context, id, (krb5_pointer) i, 1); } static krb5_error_code -krb5_fcc_read_times(context, id, t) - krb5_context context; - krb5_ccache id; - krb5_ticket_times *t; +krb5_fcc_read_times(krb5_context context, krb5_ccache id, krb5_ticket_times *t) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code retval; @@ -759,10 +728,7 @@ errout: } static krb5_error_code -krb5_fcc_read_authdata(context, id, a) - krb5_context context; - krb5_ccache id; - krb5_authdata ***a; +krb5_fcc_read_authdata(krb5_context context, krb5_ccache id, krb5_authdata ***a) { krb5_error_code kret; krb5_int32 length; @@ -807,10 +773,7 @@ krb5_fcc_read_authdata(context, id, a) } static krb5_error_code -krb5_fcc_read_authdatum(context, id, a) - krb5_context context; - krb5_ccache id; - krb5_authdata *a; +krb5_fcc_read_authdatum(krb5_context context, krb5_ccache id, krb5_authdata *a) { krb5_error_code kret; krb5_int32 int32; @@ -864,11 +827,7 @@ krb5_fcc_read_authdatum(context, id, a) * system errors */ static krb5_error_code -krb5_fcc_write(context, id, buf, len) - krb5_context context; - krb5_ccache id; - krb5_pointer buf; - unsigned int len; +krb5_fcc_write(krb5_context context, krb5_ccache id, krb5_pointer buf, unsigned int len) { int ret; #ifndef USE_STDIO @@ -903,10 +862,7 @@ krb5_fcc_write(context, id, buf, len) */ static krb5_error_code -krb5_fcc_store_principal(context, id, princ) - krb5_context context; - krb5_ccache id; - krb5_principal princ; +krb5_fcc_store_principal(krb5_context context, krb5_ccache id, krb5_principal princ) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code ret; @@ -942,10 +898,7 @@ krb5_fcc_store_principal(context, id, princ) } static krb5_error_code -krb5_fcc_store_addrs(context, id, addrs) - krb5_context context; - krb5_ccache id; - krb5_address ** addrs; +krb5_fcc_store_addrs(krb5_context context, krb5_ccache id, krb5_address **addrs) { krb5_error_code ret; krb5_address **temp; @@ -969,10 +922,7 @@ krb5_fcc_store_addrs(context, id, addrs) } static krb5_error_code -krb5_fcc_store_keyblock(context, id, keyblock) - krb5_context context; - krb5_ccache id; - krb5_keyblock *keyblock; +krb5_fcc_store_keyblock(krb5_context context, krb5_ccache id, krb5_keyblock *keyblock) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code ret; @@ -989,10 +939,7 @@ krb5_fcc_store_keyblock(context, id, keyblock) } static krb5_error_code -krb5_fcc_store_addr(context, id, addr) - krb5_context context; - krb5_ccache id; - krb5_address *addr; +krb5_fcc_store_addr(krb5_context context, krb5_ccache id, krb5_address *addr) { krb5_error_code ret; @@ -1005,10 +952,7 @@ krb5_fcc_store_addr(context, id, addr) static krb5_error_code -krb5_fcc_store_data(context, id, data) - krb5_context context; - krb5_ccache id; - krb5_data *data; +krb5_fcc_store_data(krb5_context context, krb5_ccache id, krb5_data *data) { krb5_error_code ret; @@ -1018,10 +962,7 @@ krb5_fcc_store_data(context, id, data) } static krb5_error_code -krb5_fcc_store_int32(context, id, i) - krb5_context context; - krb5_ccache id; - krb5_int32 i; +krb5_fcc_store_int32(krb5_context context, krb5_ccache id, krb5_int32 i) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; unsigned char buf[4]; @@ -1059,10 +1000,7 @@ krb5_fcc_store_int32(context, id, i) } static krb5_error_code -krb5_fcc_store_ui_4(context, id, i) - krb5_context context; - krb5_ccache id; - krb5_ui_4 i; +krb5_fcc_store_ui_4(krb5_context context, krb5_ccache id, krb5_ui_4 i) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; unsigned char buf[4]; @@ -1100,10 +1038,7 @@ krb5_fcc_store_ui_4(context, id, i) } static krb5_error_code -krb5_fcc_store_ui_2(context, id, i) - krb5_context context; - krb5_ccache id; - krb5_int32 i; +krb5_fcc_store_ui_2(krb5_context context, krb5_ccache id, krb5_int32 i) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_ui_2 ibuf; @@ -1135,10 +1070,7 @@ krb5_fcc_store_ui_2(context, id, i) } static krb5_error_code -krb5_fcc_store_octet(context, id, i) - krb5_context context; - krb5_ccache id; - krb5_int32 i; +krb5_fcc_store_octet(krb5_context context, krb5_ccache id, krb5_int32 i) { krb5_octet ibuf; @@ -1151,10 +1083,7 @@ krb5_fcc_store_octet(context, id, i) } static krb5_error_code -krb5_fcc_store_times(context, id, t) - krb5_context context; - krb5_ccache id; - krb5_ticket_times *t; +krb5_fcc_store_times(krb5_context context, krb5_ccache id, krb5_ticket_times *t) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code retval; @@ -1176,10 +1105,7 @@ krb5_fcc_store_times(context, id, t) } static krb5_error_code -krb5_fcc_store_authdata(context, id, a) - krb5_context context; - krb5_ccache id; - krb5_authdata **a; +krb5_fcc_store_authdata(krb5_context context, krb5_ccache id, krb5_authdata **a) { krb5_error_code ret; krb5_authdata **temp; @@ -1200,10 +1126,7 @@ krb5_fcc_store_authdata(context, id, a) } static krb5_error_code -krb5_fcc_store_authdatum (context, id, a) - krb5_context context; - krb5_ccache id; - krb5_authdata *a; +krb5_fcc_store_authdatum (krb5_context context, krb5_ccache id, krb5_authdata *a) { krb5_error_code ret; ret = krb5_fcc_store_ui_2(context, id, a->ad_type); @@ -1257,9 +1180,7 @@ static FILE *my_fopen(char *path, char *mode) #endif static krb5_error_code -krb5_fcc_close_file (context, id) - krb5_context context; - krb5_ccache id; +krb5_fcc_close_file (krb5_context context, krb5_ccache id) { int ret; krb5_fcc_data *data = (krb5_fcc_data *)id->data; @@ -1308,10 +1229,7 @@ krb5_fcc_close_file (context, id) #endif static krb5_error_code -krb5_fcc_open_file (context, id, mode) - krb5_context context; - krb5_ccache id; - int mode; +krb5_fcc_open_file (krb5_context context, krb5_ccache id, int mode) { krb5_os_context os_ctx = (krb5_os_context)context->os_context; krb5_fcc_data *data = (krb5_fcc_data *)id->data; @@ -1548,9 +1466,7 @@ done: } static krb5_error_code -krb5_fcc_skip_header(context, id) - krb5_context context; - krb5_ccache id; +krb5_fcc_skip_header(krb5_context context, krb5_ccache id) { krb5_fcc_data *data = (krb5_fcc_data *)id->data; krb5_error_code kret; @@ -1577,9 +1493,7 @@ krb5_fcc_skip_header(context, id) } static krb5_error_code -krb5_fcc_skip_principal(context, id) - krb5_context context; - krb5_ccache id; +krb5_fcc_skip_principal(krb5_context context, krb5_ccache id) { krb5_error_code kret; krb5_principal princ; @@ -1606,10 +1520,7 @@ krb5_fcc_skip_principal(context, id) * permission errors */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_initialize(context, id, princ) - krb5_context context; - krb5_ccache id; - krb5_principal princ; +krb5_fcc_initialize(krb5_context context, krb5_ccache id, krb5_principal princ) { krb5_error_code kret = 0; #ifndef USE_STDIO @@ -1657,9 +1568,7 @@ krb5_fcc_initialize(context, id, princ) * associated with the cache. */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_close(context, id) - krb5_context context; - krb5_ccache id; +krb5_fcc_close(krb5_context context, krb5_ccache id) { register int closeval = KRB5_OK; register krb5_fcc_data *data = (krb5_fcc_data *) id->data; @@ -1699,9 +1608,7 @@ krb5_fcc_close(context, id) * system errors */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_destroy(context, id) - krb5_context context; - krb5_ccache id; +krb5_fcc_destroy(krb5_context context, krb5_ccache id) { #ifndef USE_STDIO struct stat buf; @@ -1881,10 +1788,7 @@ extern krb5_cc_ops krb5_fcc_ops; * permission errors */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_resolve (context, id, residual) - krb5_context context; - krb5_ccache *id; - const char *residual; +krb5_fcc_resolve (krb5_context context, krb5_ccache *id, const char *residual) { krb5_ccache lid; @@ -1942,10 +1846,7 @@ krb5_fcc_resolve (context, id, residual) * system errors */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_start_seq_get(context, id, cursor) - krb5_context context; - krb5_ccache id; - krb5_cc_cursor *cursor; +krb5_fcc_start_seq_get(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) { krb5_fcc_cursor *fcursor; krb5_error_code kret = KRB5_OK; @@ -2008,11 +1909,7 @@ done: * system errors */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_next_cred(context, id, cursor, creds) - krb5_context context; - krb5_ccache id; - krb5_cc_cursor *cursor; - krb5_creds *creds; +krb5_fcc_next_cred(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds) { #define TCHECK(ret) if (ret != KRB5_OK) goto lose; #ifdef USE_STDIO @@ -2115,10 +2012,7 @@ lose: */ /* ARGSUSED */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_end_seq_get(context, id, cursor) - krb5_context context; - krb5_ccache id; - krb5_cc_cursor *cursor; +krb5_fcc_end_seq_get(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) { /* don't close; it may be left open by the caller, and if not, fcc_start_seq_get and/or fcc_next_cred will do the @@ -2145,9 +2039,7 @@ krb5_fcc_end_seq_get(context, id, cursor) * system errors (from open) */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_generate_new (context, id) - krb5_context context; - krb5_ccache *id; +krb5_fcc_generate_new (krb5_context context, krb5_ccache *id) { krb5_ccache lid; #ifndef USE_STDIO @@ -2308,9 +2200,7 @@ err_out: * The name of the file cred cache id. */ static const char * KRB5_CALLCONV -krb5_fcc_get_name (context, id) - krb5_context context; - krb5_ccache id; +krb5_fcc_get_name (krb5_context context, krb5_ccache id) { return (char *) ((krb5_fcc_data *) id->data)->filename; } @@ -2329,10 +2219,7 @@ krb5_fcc_get_name (context, id) * KRB5_CC_NOMEM */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_get_principal(context, id, princ) - krb5_context context; - krb5_ccache id; - krb5_principal *princ; +krb5_fcc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *princ) { krb5_error_code kret = KRB5_OK; @@ -2350,12 +2237,7 @@ done: static krb5_error_code KRB5_CALLCONV -krb5_fcc_retrieve(context, id, whichfields, mcreds, creds) - krb5_context context; - krb5_ccache id; - krb5_flags whichfields; - krb5_creds *mcreds; - krb5_creds *creds; +krb5_fcc_retrieve(krb5_context context, krb5_ccache id, krb5_flags whichfields, krb5_creds *mcreds, krb5_creds *creds) { return krb5_cc_retrieve_cred_default (context, id, whichfields, mcreds, creds); @@ -2374,10 +2256,7 @@ krb5_fcc_retrieve(context, id, whichfields, mcreds, creds) * storage failure errors */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_store(context, id, creds) - krb5_context context; - krb5_ccache id; - krb5_creds *creds; +krb5_fcc_store(krb5_context context, krb5_ccache id, krb5_creds *creds) { #define TCHECK(ret) if (ret != KRB5_OK) goto lose; krb5_error_code ret; @@ -2439,10 +2318,7 @@ lose: * Sets the operational flags of id to flags. */ static krb5_error_code KRB5_CALLCONV -krb5_fcc_set_flags(context, id, flags) - krb5_context context; - krb5_ccache id; - krb5_flags flags; +krb5_fcc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags) { krb5_error_code ret = KRB5_OK; @@ -2473,9 +2349,7 @@ krb5_fcc_set_flags(context, id, flags) static krb5_error_code -krb5_fcc_interpret(context, errnum) - krb5_context context; - int errnum; +krb5_fcc_interpret(krb5_context context, int errnum) { register krb5_error_code retval; switch (errnum) { @@ -2572,12 +2446,12 @@ krb5_get_notification_message (void) { #else /* _WIN32 */ krb5_error_code -krb5_change_cache () +krb5_change_cache (void) { return 0; } unsigned int -krb5_get_notification_message () +krb5_get_notification_message (void) { return 0; } diff --git a/src/lib/krb5/ccache/cc_memory.c b/src/lib/krb5/ccache/cc_memory.c index 76748cd9f..99c42f578 100644 --- a/src/lib/krb5/ccache/cc_memory.c +++ b/src/lib/krb5/ccache/cc_memory.c @@ -81,7 +81,7 @@ krb5_error_code KRB5_CALLCONV krb5_mcc_set_flags (krb5_context, krb5_ccache id , krb5_flags flags ); extern krb5_cc_ops krb5_mcc_ops; -krb5_error_code krb5_change_cache (); +krb5_error_code krb5_change_cache (void); #define KRB5_OK 0 @@ -114,10 +114,7 @@ static krb5_mcc_data *mcc_head = 0; void krb5_mcc_free (krb5_context context, krb5_ccache id); krb5_error_code KRB5_CALLCONV -krb5_mcc_initialize(context, id, princ) - krb5_context context; - krb5_ccache id; - krb5_principal princ; +krb5_mcc_initialize(krb5_context context, krb5_ccache id, krb5_principal princ) { krb5_error_code ret; @@ -138,9 +135,7 @@ krb5_mcc_initialize(context, id, princ) * associated with the cache. */ krb5_error_code KRB5_CALLCONV -krb5_mcc_close(context, id) - krb5_context context; - krb5_ccache id; +krb5_mcc_close(krb5_context context, krb5_ccache id) { krb5_xfree(id); @@ -148,9 +143,7 @@ krb5_mcc_close(context, id) } void -krb5_mcc_free(context, id) - krb5_context context; - krb5_ccache id; +krb5_mcc_free(krb5_context context, krb5_ccache id) { krb5_mcc_cursor curr,next; @@ -173,9 +166,7 @@ krb5_mcc_free(context, id) * none */ krb5_error_code KRB5_CALLCONV -krb5_mcc_destroy(context, id) - krb5_context context; - krb5_ccache id; +krb5_mcc_destroy(krb5_context context, krb5_ccache id) { krb5_mcc_data *curr; @@ -222,10 +213,7 @@ krb5_mcc_destroy(context, id) * permission errors */ krb5_error_code KRB5_CALLCONV -krb5_mcc_resolve (context, id, residual) - krb5_context context; - krb5_ccache *id; - const char *residual; +krb5_mcc_resolve (krb5_context context, krb5_ccache *id, const char *residual) { krb5_ccache lid; krb5_mcc_data *ptr; @@ -285,10 +273,7 @@ krb5_mcc_resolve (context, id, residual) * system errors */ krb5_error_code KRB5_CALLCONV -krb5_mcc_start_seq_get(context, id, cursor) - krb5_context context; - krb5_ccache id; - krb5_cc_cursor *cursor; +krb5_mcc_start_seq_get(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) { krb5_mcc_cursor mcursor; @@ -318,11 +303,7 @@ krb5_mcc_start_seq_get(context, id, cursor) * system errors */ krb5_error_code KRB5_CALLCONV -krb5_mcc_next_cred(context, id, cursor, creds) - krb5_context context; - krb5_ccache id; - krb5_cc_cursor *cursor; - krb5_creds *creds; +krb5_mcc_next_cred(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds) { krb5_mcc_cursor mcursor; krb5_error_code retval; @@ -396,10 +377,7 @@ cleanclient: */ /* ARGSUSED */ krb5_error_code KRB5_CALLCONV -krb5_mcc_end_seq_get(context, id, cursor) - krb5_context context; - krb5_ccache id; - krb5_cc_cursor *cursor; +krb5_mcc_end_seq_get(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) { *cursor = 0L; return KRB5_OK; @@ -420,9 +398,7 @@ krb5_mcc_end_seq_get(context, id, cursor) * system errors (from open) */ krb5_error_code KRB5_CALLCONV -krb5_mcc_generate_new (context, id) - krb5_context context; - krb5_ccache *id; +krb5_mcc_generate_new (krb5_context context, krb5_ccache *id) { krb5_ccache lid; char scratch[6+1]; /* 6 for the scratch part, +1 for NUL */ @@ -475,9 +451,7 @@ krb5_mcc_generate_new (context, id) * The name of the file cred cache id. */ const char * KRB5_CALLCONV -krb5_mcc_get_name (context, id) - krb5_context context; - krb5_ccache id; +krb5_mcc_get_name (krb5_context context, krb5_ccache id) { return (char *) ((krb5_mcc_data *) id->data)->name; } @@ -496,10 +470,7 @@ krb5_mcc_get_name (context, id) * KRB5_CC_NOMEM */ krb5_error_code KRB5_CALLCONV -krb5_mcc_get_principal(context, id, princ) - krb5_context context; - krb5_ccache id; - krb5_principal *princ; +krb5_mcc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *princ) { krb5_mcc_data *ptr = (krb5_mcc_data *)id->data; if (!ptr->prin) @@ -511,12 +482,7 @@ krb5_mcc_get_principal(context, id, princ) } krb5_error_code KRB5_CALLCONV -krb5_mcc_retrieve(context, id, whichfields, mcreds, creds) - krb5_context context; - krb5_ccache id; - krb5_flags whichfields; - krb5_creds *mcreds; - krb5_creds *creds; +krb5_mcc_retrieve(krb5_context context, krb5_ccache id, krb5_flags whichfields, krb5_creds *mcreds, krb5_creds *creds) { return krb5_cc_retrieve_cred_default (context, id, whichfields, mcreds, creds); @@ -536,10 +502,7 @@ krb5_mcc_retrieve(context, id, whichfields, mcreds, creds) * storage failure errors */ krb5_error_code KRB5_CALLCONV -krb5_mcc_store(context, id, creds) - krb5_context context; - krb5_ccache id; - krb5_creds *creds; +krb5_mcc_store(krb5_context context, krb5_ccache id, krb5_creds *creds) { krb5_error_code ret; krb5_mcc_cursor mcursor; @@ -568,10 +531,7 @@ krb5_mcc_store(context, id, creds) * Sets the operational flags of id to flags. */ krb5_error_code KRB5_CALLCONV -krb5_mcc_set_flags(context, id, flags) - krb5_context context; - krb5_ccache id; - krb5_flags flags; +krb5_mcc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags) { return KRB5_OK; } diff --git a/src/lib/krb5/ccache/cc_retr.c b/src/lib/krb5/ccache/cc_retr.c index 11fc6ddbe..ebd6193cd 100644 --- a/src/lib/krb5/ccache/cc_retr.c +++ b/src/lib/krb5/ccache/cc_retr.c @@ -35,9 +35,7 @@ #define times_match_exact(t1,t2) (memcmp((char *)(t1), (char *)(t2), sizeof(*(t1))) == 0) static krb5_boolean -times_match(t1, t2) - const krb5_ticket_times *t1; - const krb5_ticket_times *t2; +times_match(const krb5_ticket_times *t1, const krb5_ticket_times *t2) { if (t1->renew_till) { if (t1->renew_till > t2->renew_till) @@ -52,10 +50,7 @@ times_match(t1, t2) } static krb5_boolean -standard_fields_match(context, mcreds, creds) -krb5_context context; -const krb5_creds *mcreds; -const krb5_creds *creds; +standard_fields_match(krb5_context context, const krb5_creds *mcreds, const krb5_creds *creds) { return (krb5_principal_compare(context, mcreds->client,creds->client) && krb5_principal_compare(context, mcreds->server,creds->server)); @@ -64,9 +59,7 @@ const krb5_creds *creds; /* only match the server name portion, not the server realm portion */ static krb5_boolean -srvname_match(context, mcreds, creds) - krb5_context context; - const krb5_creds *mcreds, *creds; +srvname_match(krb5_context context, const krb5_creds *mcreds, const krb5_creds *creds) { krb5_boolean retval; krb5_principal_data p1, p2; @@ -84,8 +77,7 @@ srvname_match(context, mcreds, creds) } static krb5_boolean -authdata_match(mdata, data) - krb5_authdata * const *mdata, * const *data; +authdata_match(krb5_authdata *const *mdata, krb5_authdata *const *data) { const krb5_authdata *mdatap, *datap; @@ -111,8 +103,7 @@ authdata_match(mdata, data) } static krb5_boolean -data_match(data1, data2) - const krb5_data *data1, *data2; +data_match(const krb5_data *data1, const krb5_data *data2) { if (!data1) { if (!data2) @@ -167,15 +158,7 @@ pref (krb5_enctype my_ktype, int nktypes, krb5_enctype *ktypes) */ static krb5_error_code -krb5_cc_retrieve_cred_seq (context, id, whichfields, - mcreds, creds, nktypes, ktypes) - krb5_context context; - krb5_ccache id; - krb5_flags whichfields; - krb5_creds *mcreds; - krb5_creds *creds; - int nktypes; - krb5_enctype *ktypes; +krb5_cc_retrieve_cred_seq (krb5_context context, krb5_ccache id, krb5_flags whichfields, krb5_creds *mcreds, krb5_creds *creds, int nktypes, krb5_enctype *ktypes) { /* This function could be considerably faster if it kept indexing */ /* information.. sounds like a "next version" idea to me. :-) */ @@ -257,12 +240,7 @@ krb5_cc_retrieve_cred_seq (context, id, whichfields, } krb5_error_code KRB5_CALLCONV -krb5_cc_retrieve_cred_default (context, id, flags, mcreds, creds) - krb5_context context; - krb5_ccache id; - krb5_flags flags; - krb5_creds *mcreds; - krb5_creds *creds; +krb5_cc_retrieve_cred_default (krb5_context context, krb5_ccache id, krb5_flags flags, krb5_creds *mcreds, krb5_creds *creds) { krb5_enctype *ktypes; int nktypes; diff --git a/src/lib/krb5/ccache/ccbase.c b/src/lib/krb5/ccache/ccbase.c index 7c15d5070..c4c312b3e 100644 --- a/src/lib/krb5/ccache/ccbase.c +++ b/src/lib/krb5/ccache/ccbase.c @@ -46,10 +46,7 @@ static struct krb5_cc_typelist *cc_typehead = &cc_entry; */ krb5_error_code KRB5_CALLCONV -krb5_cc_register(context, ops, override) - krb5_context context; - krb5_cc_ops *ops; - krb5_boolean override; +krb5_cc_register(krb5_context context, krb5_cc_ops *ops, krb5_boolean override) { struct krb5_cc_typelist *t; for (t = cc_typehead;t && strcmp(t->ops->prefix,ops->prefix);t = t->next) @@ -80,10 +77,7 @@ krb5_cc_register(context, ops, override) */ krb5_error_code KRB5_CALLCONV -krb5_cc_resolve (context, name, cache) - krb5_context context; - const char *name; - krb5_ccache *cache; +krb5_cc_resolve (krb5_context context, const char *name, krb5_ccache *cache) { struct krb5_cc_typelist *tlist; char *pfx, *cp; diff --git a/src/lib/krb5/ccache/cccopy.c b/src/lib/krb5/ccache/cccopy.c index 4719baafe..a9a45b501 100644 --- a/src/lib/krb5/ccache/cccopy.c +++ b/src/lib/krb5/ccache/cccopy.c @@ -1,10 +1,7 @@ #include "k5-int.h" krb5_error_code KRB5_CALLCONV -krb5_cc_copy_creds(context, incc, outcc) - krb5_context context; - krb5_ccache incc; - krb5_ccache outcc; +krb5_cc_copy_creds(krb5_context context, krb5_ccache incc, krb5_ccache outcc) { krb5_error_code code; krb5_flags flags; diff --git a/src/lib/krb5/ccache/ccdefault.c b/src/lib/krb5/ccache/ccdefault.c index fcdfb769e..9e8a19212 100644 --- a/src/lib/krb5/ccache/ccdefault.c +++ b/src/lib/krb5/ccache/ccdefault.c @@ -34,9 +34,7 @@ #include "k5-int.h" krb5_error_code KRB5_CALLCONV -krb5_cc_default(context, ccache) - krb5_context context; - krb5_ccache *ccache; +krb5_cc_default(krb5_context context, krb5_ccache *ccache) { krb5_error_code retval; krb5_os_context os_ctx; @@ -63,9 +61,7 @@ krb5_cc_default(context, ccache) should call this function, not krb5_cc_default() */ krb5_error_code KRB5_CALLCONV -krb5int_cc_default(context, ccache) - krb5_context context; - krb5_ccache *ccache; +krb5int_cc_default(krb5_context context, krb5_ccache *ccache) { #ifdef USE_LOGIN_LIBRARY { diff --git a/src/lib/krb5/ccache/ser_cc.c b/src/lib/krb5/ccache/ser_cc.c index 23eefe42a..a7d34f93d 100644 --- a/src/lib/krb5/ccache/ser_cc.c +++ b/src/lib/krb5/ccache/ser_cc.c @@ -58,10 +58,7 @@ static const krb5_ser_entry krb5_ccache_ser_entry = { * this krb5_ccache variant. */ static krb5_error_code -krb5_ccache_size(kcontext, arg, sizep) - krb5_context kcontext; - krb5_pointer arg; - size_t *sizep; +krb5_ccache_size(krb5_context kcontext, krb5_pointer arg, size_t *sizep) { krb5_error_code kret; krb5_ccache ccache; @@ -95,11 +92,7 @@ krb5_ccache_size(kcontext, arg, sizep) * krb5_ccache_externalize() - Externalize the krb5_ccache. */ static krb5_error_code -krb5_ccache_externalize(kcontext, arg, buffer, lenremain) - krb5_context kcontext; - krb5_pointer arg; - krb5_octet **buffer; - size_t *lenremain; +krb5_ccache_externalize(krb5_context kcontext, krb5_pointer arg, krb5_octet **buffer, size_t *lenremain) { krb5_error_code kret; krb5_ccache ccache; @@ -159,11 +152,7 @@ krb5_ccache_externalize(kcontext, arg, buffer, lenremain) * krb5_ccache_internalize() - Internalize the krb5_ccache. */ static krb5_error_code -krb5_ccache_internalize(kcontext, argp, buffer, lenremain) - krb5_context kcontext; - krb5_pointer *argp; - krb5_octet **buffer; - size_t *lenremain; +krb5_ccache_internalize(krb5_context kcontext, krb5_pointer *argp, krb5_octet **buffer, size_t *lenremain) { krb5_error_code kret; krb5_ccache ccache; @@ -207,8 +196,7 @@ krb5_ccache_internalize(kcontext, argp, buffer, lenremain) * Register the ccache serializer. */ krb5_error_code KRB5_CALLCONV -krb5_ser_ccache_init(kcontext) - krb5_context kcontext; +krb5_ser_ccache_init(krb5_context kcontext) { return(krb5_register_serializer(kcontext, &krb5_ccache_ser_entry)); } diff --git a/src/lib/krb5/ccache/t_cc.c b/src/lib/krb5/ccache/t_cc.c index 381bd27cc..824ae37b5 100644 --- a/src/lib/krb5/ccache/t_cc.c +++ b/src/lib/krb5/ccache/t_cc.c @@ -41,7 +41,7 @@ krb5_creds test_creds; int debug=0; -static void init_structs() +static void init_structs(void) { static int add=0x12345; @@ -80,8 +80,7 @@ static void init_structs() test_creds.authdata = NULL; } -static void init_test_cred(context) -krb5_context context; +static void init_test_cred(krb5_context context) { #define REALM "REALM" krb5_build_principal(context, &test_creds.client, sizeof(REALM), REALM, @@ -107,10 +106,7 @@ krb5_context context; #define CHECK_FAIL(experr, kret, msg) \ if (experr != kret) { CHECK(kret, msg);} -static void cc_test(context, name, flags) - krb5_context context; - const char *name; - int flags; +static void cc_test(krb5_context context, const char *name, int flags) { krb5_ccache id, id2; krb5_creds creds; @@ -199,9 +195,7 @@ static void cc_test(context, name, flags) #endif } -static void do_test(context, prefix) -krb5_context context; -const char *prefix; +static void do_test(krb5_context context, const char *prefix) { char name[300]; @@ -212,8 +206,7 @@ const char *prefix; printf("Test on %s passed\n", name); } -static void test_misc(context) -krb5_context context; +static void test_misc(krb5_context context) { /* Tests for certain error returns */ krb5_error_code kret; @@ -243,7 +236,7 @@ krb5_context context; extern krb5_cc_ops krb5_mcc_ops; extern krb5_cc_ops krb5_fcc_ops; -int main () +int main (void) { krb5_context context; krb5_error_code kret; -- 2.26.2