In lib/krb5/krb, ensure all function definition headers are in ANSI
authorGreg Hudson <ghudson@mit.edu>
Sat, 31 Oct 2009 03:03:54 +0000 (03:03 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sat, 31 Oct 2009 03:03:54 +0000 (03:03 +0000)
style and have the function name at the beginning of a line.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23102 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/appdefault.c
src/lib/krb5/krb/copy_auth.c
src/lib/krb5/krb/fast.c
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/gic_pwd.c
src/lib/krb5/krb/init_keyblock.c
src/lib/krb5/krb/preauth2.c
src/lib/krb5/krb/t_authdata.c
src/lib/krb5/krb/t_etypes.c
src/lib/krb5/krb/t_kerb.c

index 6fa8cd365ce03fe08bff4966c3c2b0215cc629cb..e3d14be37881ef9ae3b7c45ca90ba157230d34eb 100644 (file)
@@ -21,7 +21,8 @@ static const char *const conf_no[] = {
     0,
 };
 
-static int conf_boolean(char *s)
+static int
+conf_boolean(char *s)
 {
     const char * const *p;
     for(p=conf_yes; *p; p++) {
@@ -36,7 +37,8 @@ static int conf_boolean(char *s)
     return 0;
 }
 
-static krb5_error_code appdefault_get(krb5_context context, const char *appname, const krb5_data *realm, const char *option, char **ret_value)
+static krb5_error_code
+appdefault_get(krb5_context context, const char *appname, const krb5_data *realm, const char *option, char **ret_value)
 {
     profile_t profile;
     const char *names[5];
index 303badd2ff7ee19eb51c52d3e763dee9c5697d31..0262fe5bbcd703bba088c49470765f4b1185fbdf 100644 (file)
@@ -195,9 +195,9 @@ struct find_authdata_context {
     size_t length;
 };
 
-static krb5_error_code grow_find_authdata
-(krb5_context context, struct find_authdata_context *fctx,
- krb5_authdata *elem)
+static krb5_error_code
+grow_find_authdata(krb5_context context, struct find_authdata_context *fctx,
                  krb5_authdata *elem)
 {
     krb5_error_code retval = 0;
     if (fctx->length == fctx->space) {
@@ -221,12 +221,9 @@ static krb5_error_code grow_find_authdata
     return retval;
 }
 
-
-
-
-static krb5_error_code find_authdata_1
-(krb5_context context, krb5_authdata *const *in_authdat, krb5_authdatatype ad_type,
- struct find_authdata_context *fctx)
+static krb5_error_code
+find_authdata_1(krb5_context context, krb5_authdata *const *in_authdat,
+                krb5_authdatatype ad_type, struct find_authdata_context *fctx)
 {
     int i = 0;
     krb5_error_code retval=0;
@@ -254,11 +251,11 @@ static krb5_error_code find_authdata_1
 }
 
 
-krb5_error_code krb5int_find_authdata
-(krb5_context context, krb5_authdata *const * ticket_authdata,
krb5_authdata * const *ap_req_authdata,
krb5_authdatatype ad_type,
- krb5_authdata ***results)
+krb5_error_code
+krb5int_find_authdata(krb5_context context,
                     krb5_authdata *const *ticket_authdata,
                     krb5_authdata *const *ap_req_authdata,
                     krb5_authdatatype ad_type, krb5_authdata ***results)
 {
     krb5_error_code retval = 0;
     struct find_authdata_context fctx;
index ae5602cde61f1bc0b1f93613a5e6f42e75627179..7d6bc274ca046d45814ac234c4b0dd63a1a6f94a 100644 (file)
 #include "int-proto.h"
 
 
-static krb5_error_code fast_armor_ap_request
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_ccache ccache, krb5_data *target_realm)
+static krb5_error_code
+fast_armor_ap_request(krb5_context context,
+                      struct krb5int_fast_request_state *state,
+                      krb5_ccache ccache, krb5_data *target_realm)
 {
     krb5_error_code retval = 0;
     krb5_creds creds, *out_creds = NULL;
@@ -129,10 +130,11 @@ krb5int_fast_prep_req_body(krb5_context context, struct krb5int_fast_request_sta
     return retval;
 }
 
-krb5_error_code krb5int_fast_as_armor
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_gic_opt_ext *opte,
- krb5_kdc_req *request)
+krb5_error_code
+krb5int_fast_as_armor(krb5_context context,
+                      struct krb5int_fast_request_state *state,
+                      krb5_gic_opt_ext *opte,
+                      krb5_kdc_req *request)
 {
     krb5_error_code retval = 0;
     krb5_ccache ccache = NULL;
@@ -159,10 +161,12 @@ krb5_error_code krb5int_fast_as_armor
 
 
 krb5_error_code
-krb5int_fast_prep_req (krb5_context context, struct krb5int_fast_request_state *state,
-                       krb5_kdc_req *request,
-                       const krb5_data *to_be_checksummed, kdc_req_encoder_proc encoder,
-                       krb5_data **encoded_request)
+krb5int_fast_prep_req(krb5_context context,
+                      struct krb5int_fast_request_state *state,
+                      krb5_kdc_req *request,
+                      const krb5_data *to_be_checksummed,
+                      kdc_req_encoder_proc encoder,
+                      krb5_data **encoded_request)
 {
     krb5_error_code retval = 0;
     krb5_pa_data *pa_array[2];
@@ -247,10 +251,11 @@ krb5int_fast_prep_req (krb5_context context, struct krb5int_fast_request_state *
     return retval;
 }
 
-static krb5_error_code decrypt_fast_reply
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_pa_data **in_padata,
- krb5_fast_response **response)
+static krb5_error_code
+decrypt_fast_reply(krb5_context context,
+                   struct krb5int_fast_request_state *state,
+                   krb5_pa_data **in_padata,
+                   krb5_fast_response **response)
 {
     krb5_error_code retval = 0;
     krb5_data scratch;
@@ -319,8 +324,10 @@ static krb5_error_code decrypt_fast_reply
  * whenever padata  is available (all the time with fast).
  */
 krb5_error_code
-krb5int_fast_process_error(krb5_context context, struct krb5int_fast_request_state *state,
-                           krb5_error **err_replyptr                       , krb5_pa_data ***out_padata,
+krb5int_fast_process_error(krb5_context context,
+                           struct krb5int_fast_request_state *state,
+                           krb5_error **err_replyptr,
+                           krb5_pa_data ***out_padata,
                            krb5_boolean *retry)
 {
     krb5_error_code retval = 0;
@@ -410,10 +417,11 @@ krb5int_fast_process_error(krb5_context context, struct krb5int_fast_request_sta
 }
 
 
-krb5_error_code krb5int_fast_process_response
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_kdc_rep *resp,
- krb5_keyblock **strengthen_key)
+krb5_error_code
+krb5int_fast_process_response(krb5_context context,
+                              struct krb5int_fast_request_state *state,
+                              krb5_kdc_rep *resp,
+                              krb5_keyblock **strengthen_key)
 {
     krb5_error_code retval = 0;
     krb5_fast_response *fast_response = NULL;
@@ -460,10 +468,11 @@ krb5_error_code krb5int_fast_process_response
     return retval;
 }
 
-krb5_error_code krb5int_fast_reply_key(krb5_context context,
-                                       krb5_keyblock *strengthen_key,
-                                       krb5_keyblock *existing_key,
-                                       krb5_keyblock *out_key)
+krb5_error_code
+krb5int_fast_reply_key(krb5_context context,
+                       krb5_keyblock *strengthen_key,
+                       krb5_keyblock *existing_key,
+                       krb5_keyblock *out_key)
 {
     krb5_keyblock *key = NULL;
     krb5_error_code retval = 0;
@@ -503,8 +512,9 @@ krb5int_fast_free_state( krb5_context context, struct krb5int_fast_request_state
     free(state);
 }
 
-krb5_pa_data * krb5int_find_pa_data
-(krb5_context context, krb5_pa_data *const *padata, krb5_preauthtype pa_type)
+krb5_pa_data *
+krb5int_find_pa_data(krb5_context context, krb5_pa_data *const *padata,
+                     krb5_preauthtype pa_type)
 {
     krb5_pa_data * const *tmppa;
 
index 40afea56d562618d46bdf8736ac54bf725da3c96..4fd8376260fc95060354dec8bcf444dd851f362d 100644 (file)
@@ -97,7 +97,8 @@ static krb5_error_code sort_krb5_padata_sequence(krb5_context context,
  * This function performs 32 bit bounded addition so we can generate
  * lifetimes without overflowing krb5_int32
  */
-static krb5_int32 krb5int_addint32 (krb5_int32 x, krb5_int32 y)
+static krb5_int32
+krb5int_addint32 (krb5_int32 x, krb5_int32 y)
 {
     if ((x > 0) && (y > (KRB5_INT32_MAX - x))) {
         /* sum will be be greater than KRB5_INT32_MAX */
index fa0c1739a094ae91a2c150bb7f4685c60b50fa90..84e5b4965d1d623741764074d8921a102283ce47 100644 (file)
@@ -407,10 +407,12 @@ cleanup:
 
     return(ret);
 }
-krb5_error_code krb5int_populate_gic_opt (
-    krb5_context context, krb5_gic_opt_ext **opte,
-    krb5_flags options, krb5_address * const *addrs, krb5_enctype *ktypes,
-    krb5_preauthtype *pre_auth_types, krb5_creds *creds)
+
+krb5_error_code
+krb5int_populate_gic_opt(krb5_context context, krb5_gic_opt_ext **opte,
+                         krb5_flags options, krb5_address *const *addrs,
+                         krb5_enctype *ktypes,
+                         krb5_preauthtype *pre_auth_types, krb5_creds *creds)
 {
     int i;
     krb5_int32 starttime;
index baf7dabece4c6f89f9da8be6121092668a6ce047..6fe663015fe62eb21487509469b985bc96f533b4 100644 (file)
@@ -34,9 +34,9 @@
 #include "k5-int.h"
 #include <assert.h>
 
-krb5_error_code KRB5_CALLCONV  krb5_init_keyblock
-(krb5_context context, krb5_enctype enctype,
- size_t length, krb5_keyblock **out)
+krb5_error_code KRB5_CALLCONV
+krb5_init_keyblock(krb5_context context, krb5_enctype enctype,
                  size_t length, krb5_keyblock **out)
 {
     return krb5int_c_init_keyblock (context, enctype, length, out);
 }
index 7ee086037c515264867fd7cbfae29881cc0526d7..c96f0f5b3c4a33f6b350d0f9664e7a0ae87c3500 100644 (file)
@@ -624,16 +624,11 @@ padata2data(krb5_pa_data p)
     return d;
 }
 
-static
-krb5_error_code pa_salt(krb5_context context,
-                        krb5_kdc_req *request,
-                        krb5_pa_data *in_padata,
-                        krb5_pa_data **out_padata,
-                        krb5_data *salt, krb5_data *s2kparams,
-                        krb5_enctype *etype,
-                        krb5_keyblock *as_key,
-                        krb5_prompter_fct prompter, void *prompter_data,
-                        krb5_gic_get_as_key_fct gak_fct, void *gak_data)
+static krb5_error_code
+pa_salt(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+        krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+        krb5_enctype *etype, krb5_keyblock *as_key, krb5_prompter_fct prompter,
+        void *prompter_data, krb5_gic_get_as_key_fct gak_fct, void *gak_data)
 {
     krb5_data tmp;
     krb5_error_code retval;
@@ -650,19 +645,13 @@ krb5_error_code pa_salt(krb5_context context,
     return(0);
 }
 
-static
-krb5_error_code pa_fx_cookie(krb5_context context,
-                             krb5_kdc_req *request,
-                             krb5_pa_data *in_padata,
-                             krb5_pa_data **out_padata,
-                             krb5_data *salt,
-                             krb5_data *s2kparams,
-                             krb5_enctype *etype,
-                             krb5_keyblock *as_key,
-                             krb5_prompter_fct prompter,
-                             void *prompter_data,
-                             krb5_gic_get_as_key_fct gak_fct,
-                             void *gak_data)
+static krb5_error_code
+pa_fx_cookie(krb5_context context, krb5_kdc_req *request,
+             krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+             krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+             krb5_keyblock *as_key, krb5_prompter_fct prompter,
+             void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+             void *gak_data)
 {
     krb5_pa_data *pa = calloc(1, sizeof(krb5_pa_data));
     krb5_octet *contents;
@@ -680,19 +669,13 @@ krb5_error_code pa_fx_cookie(krb5_context context,
     return 0;
 }
 
-static
-krb5_error_code pa_enc_timestamp(krb5_context context,
-                                 krb5_kdc_req *request,
-                                 krb5_pa_data *in_padata,
-                                 krb5_pa_data **out_padata,
-                                 krb5_data *salt,
-                                 krb5_data *s2kparams,
-                                 krb5_enctype *etype,
-                                 krb5_keyblock *as_key,
-                                 krb5_prompter_fct prompter,
-                                 void *prompter_data,
-                                 krb5_gic_get_as_key_fct gak_fct,
-                                 void *gak_data)
+static krb5_error_code
+pa_enc_timestamp(krb5_context context, krb5_kdc_req *request,
+                 krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+                 krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+                 krb5_keyblock *as_key, krb5_prompter_fct prompter,
+                 void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+                 void *gak_data)
 {
     krb5_error_code ret;
     krb5_pa_enc_ts pa_enc;
@@ -770,8 +753,8 @@ krb5_error_code pa_enc_timestamp(krb5_context context,
     return(0);
 }
 
-static
-char *sam_challenge_banner(krb5_int32 sam_type)
+static char *
+sam_challenge_banner(krb5_int32 sam_type)
 {
     char *label;
 
@@ -820,19 +803,11 @@ char *sam_challenge_banner(krb5_int32 sam_type)
    draft.  This draft cannot be implemented as written.  This code is
    compatible with earlier versions of mit krb5 and cygnus kerbnet. */
 
-static
-krb5_error_code pa_sam(krb5_context context,
-                       krb5_kdc_req *request,
-                       krb5_pa_data *in_padata,
-                       krb5_pa_data **out_padata,
-                       krb5_data *salt,
-                       krb5_data *s2kparams,
-                       krb5_enctype *etype,
-                       krb5_keyblock *as_key,
-                       krb5_prompter_fct prompter,
-                       void *prompter_data,
-                       krb5_gic_get_as_key_fct gak_fct,
-                       void *gak_data)
+static krb5_error_code
+pa_sam(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+       krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+       krb5_enctype *etype, krb5_keyblock *as_key, krb5_prompter_fct prompter,
+       void *prompter_data, krb5_gic_get_as_key_fct gak_fct, void *gak_data)
 {
     krb5_error_code             ret;
     krb5_data                   tmpsam;
@@ -1380,20 +1355,13 @@ error_out:
 }
 #endif /* APPLE_PKINIT */
 
-static
-krb5_error_code pa_sam_2(krb5_context context,
-                         krb5_kdc_req *request,
-                         krb5_pa_data *in_padata,
-                         krb5_pa_data **out_padata,
-                         krb5_data *salt,
-                         krb5_data *s2kparams,
-                         krb5_enctype *etype,
-                         krb5_keyblock *as_key,
-                         krb5_prompter_fct prompter,
-                         void *prompter_data,
-                         krb5_gic_get_as_key_fct gak_fct,
-                         void *gak_data) {
-
+static krb5_error_code
+pa_sam_2(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+         krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+         krb5_enctype *etype, krb5_keyblock *as_key,
+         krb5_prompter_fct prompter, void *prompter_data,
+         krb5_gic_get_as_key_fct gak_fct, void *gak_data)
+{
     krb5_error_code retval;
     krb5_sam_challenge_2 *sc2 = NULL;
     krb5_sam_challenge_2_body *sc2b = NULL;
@@ -1707,19 +1675,13 @@ krb5_error_code pa_sam_2(krb5_context context,
     return(0);
 }
 
-static krb5_error_code pa_s4u_x509_user(
-    krb5_context context,
-    krb5_kdc_req *request,
-    krb5_pa_data *in_padata,
-    krb5_pa_data **out_padata,
-    krb5_data *salt,
-    krb5_data *s2kparams,
-    krb5_enctype *etype,
-    krb5_keyblock *as_key,
-    krb5_prompter_fct prompter,
-    void *prompter_data,
-    krb5_gic_get_as_key_fct gak_fct,
-    void *gak_data)
+static krb5_error_code
+pa_s4u_x509_user(krb5_context context, krb5_kdc_req *request,
+                 krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+                 krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+                 krb5_keyblock *as_key, krb5_prompter_fct prompter,
+                 void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+                 void *gak_data)
 {
     krb5_s4u_userid *userid = (krb5_s4u_userid *)gak_data; /* XXX private contract */
     krb5_pa_data *s4u_padata;
index ed847dfbd74c753410b5215146da6979bd1234bd..ac1f7a7c29aea8da8a525c38096b5031f1538fc7 100644 (file)
@@ -79,7 +79,8 @@ static void compare_authdata(const krb5_authdata *adc1, krb5_authdata *adc2) {
     assert(memcmp(adc1->contents, adc2->contents, adc1->length) == 0);
 }
 
-int main()
+int
+main()
 {
     krb5_context context;
     krb5_authdata **results;
index 4af7918e5ae909c880cdef6fb51024c7a7bae937..47763e594258a801f93d34f8b32769fd0415f91d 100644 (file)
@@ -131,7 +131,8 @@ static struct {
     }
 };
 
-static void show_enctypes(krb5_context ctx, krb5_enctype *list)
+static void
+show_enctypes(krb5_context ctx, krb5_enctype *list)
 {
     unsigned int i;
 
@@ -143,9 +144,9 @@ static void show_enctypes(krb5_context ctx, krb5_enctype *list)
     fprintf(stderr, "\n");
 }
 
-static void compare(krb5_context ctx, krb5_enctype *result,
-                    krb5_enctype *expected, const char *profstr,
-                    krb5_boolean weak)
+static void
+compare(krb5_context ctx, krb5_enctype *result, krb5_enctype *expected,
+        const char *profstr, krb5_boolean weak)
 {
     unsigned int i;
 
index 4652825619ac9e972815349c0c727a8ba4b4f91a..0f27ce9cec1b3f727553ad5fa973d106cbd8e3cd 100644 (file)
@@ -25,7 +25,8 @@ void test_parse_name (krb5_context, const char *);
 void test_set_realm (krb5_context, const char *, const char *);
 void usage (char *);
 
-void test_string_to_timestamp(krb5_context ctx, char *ktime)
+void
+test_string_to_timestamp(krb5_context ctx, char *ktime)
 {
     krb5_timestamp      timestamp;
     time_t              t;
@@ -40,7 +41,8 @@ void test_string_to_timestamp(krb5_context ctx, char *ktime)
     printf("Parsed time was %s", ctime(&t));
 }
 
-void test_425_conv_principal(krb5_context ctx, char *name, char *inst, char *realm)
+void
+test_425_conv_principal(krb5_context ctx, char *name, char *inst, char *realm)
 {
     krb5_error_code     retval;
     krb5_principal      princ;
@@ -62,7 +64,8 @@ void test_425_conv_principal(krb5_context ctx, char *name, char *inst, char *rea
     krb5_free_principal(ctx, princ);
 }
 
-void test_524_conv_principal(krb5_context ctx, char *name)
+void
+test_524_conv_principal(krb5_context ctx, char *name)
 {
     krb5_principal princ = 0;
     krb5_error_code retval;
@@ -89,7 +92,8 @@ fail:
         krb5_free_principal (ctx, princ);
 }
 
-void test_parse_name(krb5_context ctx, const char *name)
+void
+test_parse_name(krb5_context ctx, const char *name)
 {
     krb5_error_code retval;
     krb5_principal  princ = 0, princ2 = 0;
@@ -124,7 +128,8 @@ fail:
         krb5_free_principal(ctx, princ2);
 }
 
-void test_set_realm(krb5_context ctx, const char *name, const char *realm)
+void
+test_set_realm(krb5_context ctx, const char *name, const char *realm)
 {
     krb5_error_code retval;
     krb5_principal  princ = 0;
@@ -154,7 +159,8 @@ fail:
         krb5_free_principal(ctx, princ);
 }
 
-void usage(char *progname)
+void
+usage(char *progname)
 {
     fprintf(stderr, "%s: Usage: %s 425_conv_principal <name> <inst> <realm\n",
             progname, progname);