From: Greg Hudson Date: Tue, 10 Nov 2009 19:59:39 +0000 (+0000) Subject: In lib/krb5/keytab, ensure that function definition headers have X-Git-Tag: krb5-1.8-alpha1~194 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f67d78bafb88d8a68f9e1056220b5f6391f7d22e;p=krb5.git In lib/krb5/keytab, ensure that function definition headers have function names at the beginning of lines, and avoid putting open parentheses at the beginning of lines in function prototypes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23148 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/keytab/kt_file.c b/src/lib/krb5/keytab/kt_file.c index c27829ca0..3583506a4 100644 --- a/src/lib/krb5/keytab/kt_file.c +++ b/src/lib/krb5/keytab/kt_file.c @@ -94,104 +94,67 @@ typedef struct _krb5_ktfile_data { extern const struct _krb5_kt_ops krb5_ktf_ops; extern const struct _krb5_kt_ops krb5_ktf_writable_ops; -static krb5_error_code KRB5_CALLCONV krb5_ktfile_resolve -(krb5_context, - const char *, - krb5_keytab *); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_wresolve -(krb5_context, - const char *, - krb5_keytab *); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_get_name -(krb5_context, - krb5_keytab, - char *, - unsigned int); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_close -(krb5_context, - krb5_keytab); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_get_entry -(krb5_context, - krb5_keytab, - krb5_const_principal, - krb5_kvno, - krb5_enctype, - krb5_keytab_entry *); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_start_seq_get -(krb5_context, - krb5_keytab, - krb5_kt_cursor *); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_get_next -(krb5_context, - krb5_keytab, - krb5_keytab_entry *, - krb5_kt_cursor *); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_end_get -(krb5_context, - krb5_keytab, - krb5_kt_cursor *); +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_resolve(krb5_context, const char *, krb5_keytab *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_wresolve(krb5_context, const char *, krb5_keytab *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_get_name(krb5_context, krb5_keytab, char *, unsigned int); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_close(krb5_context, krb5_keytab); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_get_entry(krb5_context, krb5_keytab, krb5_const_principal, + krb5_kvno, krb5_enctype, krb5_keytab_entry *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_start_seq_get(krb5_context, krb5_keytab, krb5_kt_cursor *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_get_next(krb5_context, krb5_keytab, krb5_keytab_entry *, + krb5_kt_cursor *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_end_get(krb5_context, krb5_keytab, krb5_kt_cursor *); /* routines to be included on extended version (write routines) */ -static krb5_error_code KRB5_CALLCONV krb5_ktfile_add -(krb5_context, - krb5_keytab, - krb5_keytab_entry *); - -static krb5_error_code KRB5_CALLCONV krb5_ktfile_remove -(krb5_context, - krb5_keytab, - krb5_keytab_entry *); - -static krb5_error_code krb5_ktfileint_openr -(krb5_context, - krb5_keytab); - -static krb5_error_code krb5_ktfileint_openw -(krb5_context, - krb5_keytab); - -static krb5_error_code krb5_ktfileint_close -(krb5_context, - krb5_keytab); - -static krb5_error_code krb5_ktfileint_read_entry -(krb5_context, - krb5_keytab, - krb5_keytab_entry *); - -static krb5_error_code krb5_ktfileint_write_entry -(krb5_context, - krb5_keytab, - krb5_keytab_entry *); - -static krb5_error_code krb5_ktfileint_delete_entry -(krb5_context, - krb5_keytab, - krb5_int32); - -static krb5_error_code krb5_ktfileint_internal_read_entry -(krb5_context, - krb5_keytab, - krb5_keytab_entry *, - krb5_int32 *); - -static krb5_error_code krb5_ktfileint_size_entry -(krb5_context, - krb5_keytab_entry *, - krb5_int32 *); - -static krb5_error_code krb5_ktfileint_find_slot -(krb5_context, - krb5_keytab, - krb5_int32 *, - krb5_int32 *); +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_add(krb5_context, krb5_keytab, krb5_keytab_entry *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktfile_remove(krb5_context, krb5_keytab, krb5_keytab_entry *); + +static krb5_error_code +krb5_ktfileint_openr(krb5_context, krb5_keytab); + +static krb5_error_code +krb5_ktfileint_openw(krb5_context, krb5_keytab); + +static krb5_error_code +krb5_ktfileint_close(krb5_context, krb5_keytab); + +static krb5_error_code +krb5_ktfileint_read_entry(krb5_context, krb5_keytab, krb5_keytab_entry *); + +static krb5_error_code +krb5_ktfileint_write_entry(krb5_context, krb5_keytab, krb5_keytab_entry *); + +static krb5_error_code +krb5_ktfileint_delete_entry(krb5_context, krb5_keytab, krb5_int32); + +static krb5_error_code +krb5_ktfileint_internal_read_entry(krb5_context, krb5_keytab, + krb5_keytab_entry *, krb5_int32 *); + +static krb5_error_code +krb5_ktfileint_size_entry(krb5_context, krb5_keytab_entry *, krb5_int32 *); + +static krb5_error_code +krb5_ktfileint_find_slot(krb5_context, krb5_keytab, krb5_int32 *, + krb5_int32 *); /* @@ -563,12 +526,16 @@ static const char ktfile_def_name[] = "."; * krb5_ktf_keytab_externalize(); * krb5_ktf_keytab_internalize(); */ -static krb5_error_code krb5_ktf_keytab_size -(krb5_context, krb5_pointer, size_t *); -static krb5_error_code krb5_ktf_keytab_externalize -(krb5_context, krb5_pointer, krb5_octet **, size_t *); -static krb5_error_code krb5_ktf_keytab_internalize -(krb5_context,krb5_pointer *, krb5_octet **, size_t *); +static krb5_error_code +krb5_ktf_keytab_size(krb5_context, krb5_pointer, size_t *); + +static krb5_error_code +krb5_ktf_keytab_externalize(krb5_context, krb5_pointer, krb5_octet **, + size_t *); + +static krb5_error_code +krb5_ktf_keytab_internalize(krb5_context,krb5_pointer *, krb5_octet **, + size_t *); /* * Serialization entry for this type. diff --git a/src/lib/krb5/keytab/kt_memory.c b/src/lib/krb5/keytab/kt_memory.c index d58ffee5c..54bbaf004 100644 --- a/src/lib/krb5/keytab/kt_memory.c +++ b/src/lib/krb5/keytab/kt_memory.c @@ -104,61 +104,45 @@ static k5_mutex_t krb5int_mkt_mutex = K5_MUTEX_PARTIAL_INITIALIZER; extern const struct _krb5_kt_ops krb5_mkt_ops; -krb5_error_code KRB5_CALLCONV krb5_mkt_resolve -(krb5_context, - const char *, - krb5_keytab *); - -krb5_error_code KRB5_CALLCONV krb5_mkt_get_name -(krb5_context, - krb5_keytab, - char *, - unsigned int); - -krb5_error_code KRB5_CALLCONV krb5_mkt_close -(krb5_context, - krb5_keytab); - -krb5_error_code KRB5_CALLCONV krb5_mkt_get_entry -(krb5_context, - krb5_keytab, - krb5_const_principal, - krb5_kvno, - krb5_enctype, - krb5_keytab_entry *); - -krb5_error_code KRB5_CALLCONV krb5_mkt_start_seq_get -(krb5_context, - krb5_keytab, - krb5_kt_cursor *); - -krb5_error_code KRB5_CALLCONV krb5_mkt_get_next -(krb5_context, - krb5_keytab, - krb5_keytab_entry *, - krb5_kt_cursor *); - -krb5_error_code KRB5_CALLCONV krb5_mkt_end_get -(krb5_context, - krb5_keytab, - krb5_kt_cursor *); +krb5_error_code KRB5_CALLCONV +krb5_mkt_resolve(krb5_context, const char *, krb5_keytab *); + +krb5_error_code KRB5_CALLCONV +krb5_mkt_get_name(krb5_context, krb5_keytab, char *, unsigned int); + +krb5_error_code KRB5_CALLCONV +krb5_mkt_close(krb5_context, krb5_keytab); + +krb5_error_code KRB5_CALLCONV +krb5_mkt_get_entry(krb5_context, krb5_keytab, krb5_const_principal, krb5_kvno, + krb5_enctype, krb5_keytab_entry *); + +krb5_error_code KRB5_CALLCONV +krb5_mkt_start_seq_get(krb5_context, krb5_keytab, krb5_kt_cursor *); + +krb5_error_code KRB5_CALLCONV +krb5_mkt_get_next(krb5_context, krb5_keytab, krb5_keytab_entry *, + krb5_kt_cursor *); + +krb5_error_code KRB5_CALLCONV +krb5_mkt_end_get(krb5_context, krb5_keytab, krb5_kt_cursor *); /* routines to be included on extended version (write routines) */ -krb5_error_code KRB5_CALLCONV krb5_mkt_add -(krb5_context, - krb5_keytab, - krb5_keytab_entry *); +krb5_error_code KRB5_CALLCONV +krb5_mkt_add(krb5_context, krb5_keytab, krb5_keytab_entry *); -krb5_error_code KRB5_CALLCONV krb5_mkt_remove -(krb5_context, - krb5_keytab, - krb5_keytab_entry *); +krb5_error_code KRB5_CALLCONV +krb5_mkt_remove(krb5_context, krb5_keytab, krb5_keytab_entry *); -int krb5int_mkt_initialize(void) { +int +krb5int_mkt_initialize(void) +{ return k5_mutex_finish_init(&krb5int_mkt_mutex); } -void krb5int_mkt_finalize(void) { +void +krb5int_mkt_finalize(void) +{ krb5_mkt_list_node *node, *next_node; krb5_mkt_cursor cursor, next_cursor; diff --git a/src/lib/krb5/keytab/kt_srvtab.c b/src/lib/krb5/keytab/kt_srvtab.c index a2e13040b..01bd1ed73 100644 --- a/src/lib/krb5/keytab/kt_srvtab.c +++ b/src/lib/krb5/keytab/kt_srvtab.c @@ -56,57 +56,37 @@ typedef struct _krb5_ktsrvtab_data { extern const struct _krb5_kt_ops krb5_kts_ops; -static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_resolve -(krb5_context, - const char *, - krb5_keytab *); - -static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_get_name -(krb5_context, - krb5_keytab, - char *, - unsigned int); - -static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_close -(krb5_context, - krb5_keytab); - -static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_get_entry -(krb5_context, - krb5_keytab, - krb5_const_principal, - krb5_kvno, - krb5_enctype, - krb5_keytab_entry *); - -static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_start_seq_get -(krb5_context, - krb5_keytab, - krb5_kt_cursor *); - -static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_get_next -(krb5_context, - krb5_keytab, - krb5_keytab_entry *, - krb5_kt_cursor *); - -static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_end_get -(krb5_context, - krb5_keytab, - krb5_kt_cursor *); - -static krb5_error_code krb5_ktsrvint_open -(krb5_context, - krb5_keytab); - -static krb5_error_code krb5_ktsrvint_close -(krb5_context, - krb5_keytab); - -static krb5_error_code krb5_ktsrvint_read_entry -(krb5_context, - krb5_keytab, - krb5_keytab_entry *); +static krb5_error_code KRB5_CALLCONV +krb5_ktsrvtab_resolve(krb5_context, const char *, krb5_keytab *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktsrvtab_get_name(krb5_context, krb5_keytab, char *, unsigned int); + +static krb5_error_code KRB5_CALLCONV +krb5_ktsrvtab_close(krb5_context, krb5_keytab); + +static krb5_error_code KRB5_CALLCONV +krb5_ktsrvtab_get_entry(krb5_context, krb5_keytab, krb5_const_principal, + krb5_kvno, krb5_enctype, krb5_keytab_entry *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktsrvtab_start_seq_get(krb5_context, krb5_keytab, krb5_kt_cursor *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktsrvtab_get_next(krb5_context, krb5_keytab, krb5_keytab_entry *, + krb5_kt_cursor *); + +static krb5_error_code KRB5_CALLCONV +krb5_ktsrvtab_end_get(krb5_context, krb5_keytab, krb5_kt_cursor *); + +static krb5_error_code +krb5_ktsrvint_open(krb5_context, krb5_keytab); + +static krb5_error_code +krb5_ktsrvint_close(krb5_context, krb5_keytab); + +static krb5_error_code +krb5_ktsrvint_read_entry(krb5_context, krb5_keytab, krb5_keytab_entry *); /* * This is an implementation specific resolver. It returns a keytab id diff --git a/src/lib/krb5/keytab/t_keytab.c b/src/lib/krb5/keytab/t_keytab.c index 607ce9ffb..be7f68411 100644 --- a/src/lib/krb5/keytab/t_keytab.c +++ b/src/lib/krb5/keytab/t_keytab.c @@ -60,7 +60,8 @@ extern const krb5_kt_ops krb5_ktf_writable_ops; exit(1); \ } else if(debug) printf("%s went ok\n", msg); -static void test_misc(krb5_context context) +static void +test_misc(krb5_context context) { /* Tests for certain error returns */ krb5_error_code kret; @@ -92,7 +93,8 @@ static void test_misc(krb5_context context) } } -static void kt_test(krb5_context context, const char *name) +static void +kt_test(krb5_context context, const char *name) { krb5_error_code kret; krb5_keytab kt; @@ -401,8 +403,8 @@ static void kt_test(krb5_context context, const char *name) } -static void do_test(krb5_context context, const char *prefix, - krb5_boolean delete) +static void +do_test(krb5_context context, const char *prefix, krb5_boolean delete) { char *name, *filename; @@ -425,7 +427,7 @@ static void do_test(krb5_context context, const char *prefix, } int -main (void) +main(void) { krb5_context context; krb5_error_code kret;