From 592ecae1d9e6bdcdd1dd3c09ae3c5c6699524c5b Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 31 Oct 2009 03:17:27 +0000 Subject: [PATCH] In lib/krb5/os, ensure that function definition headers have function names at the beginnings of lines. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23103 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/changepw.c | 7 +++++-- src/lib/krb5/os/dnsglue.c | 6 +++--- src/lib/krb5/os/dnssrv.c | 3 ++- src/lib/krb5/os/localaddr.c | 6 ++++-- src/lib/krb5/os/locate_kdc.c | 14 +++++++++----- src/lib/krb5/os/prompter.c | 3 ++- src/lib/krb5/os/read_pwd.c | 3 ++- src/lib/krb5/os/sendto_kdc.c | 12 ++++++++---- src/lib/krb5/os/t_gifconf.c | 4 +++- src/lib/krb5/os/t_locate_kdc.c | 12 ++++++++---- src/lib/krb5/os/t_realm_iter.c | 6 ++++-- src/lib/krb5/os/t_std_conf.c | 30 ++++++++++++++++++++---------- 12 files changed, 70 insertions(+), 36 deletions(-) diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c index 10a54d2d7..ceda715b8 100644 --- a/src/lib/krb5/os/changepw.c +++ b/src/lib/krb5/os/changepw.c @@ -95,14 +95,17 @@ krb5_locate_kpasswd(krb5_context context, const krb5_data *realm, */ -static void kpasswd_sendto_msg_cleanup (void* callback_context, krb5_data* message) +static void +kpasswd_sendto_msg_cleanup (void* callback_context, krb5_data* message) { struct sendto_callback_context *ctx = callback_context; krb5_free_data_contents(ctx->context, message); } -static int kpasswd_sendto_msg_callback(struct conn_state *conn, void *callback_context, krb5_data* message) +static int +kpasswd_sendto_msg_callback(struct conn_state *conn, void *callback_context, + krb5_data *message) { krb5_error_code code = 0; struct sockaddr_storage local_addr; diff --git a/src/lib/krb5/os/dnsglue.c b/src/lib/krb5/os/dnsglue.c index f07f8211c..254370315 100644 --- a/src/lib/krb5/os/dnsglue.c +++ b/src/lib/krb5/os/dnsglue.c @@ -199,9 +199,9 @@ krb5int_dns_nextans(struct krb5int_dns_state *ds, /* * krb5int_dns_expand - wrapper for dn_expand() */ -int krb5int_dns_expand(struct krb5int_dns_state *ds, - const unsigned char *p, - char *buf, int len) +int +krb5int_dns_expand(struct krb5int_dns_state *ds, const unsigned char *p, + char *buf, int len) { #if HAVE_NS_NAME_UNCOMPRESS diff --git a/src/lib/krb5/os/dnssrv.c b/src/lib/krb5/os/dnssrv.c index 31239f414..983f0be04 100644 --- a/src/lib/krb5/os/dnssrv.c +++ b/src/lib/krb5/os/dnssrv.c @@ -37,7 +37,8 @@ * Lookup a KDC via DNS SRV records */ -void krb5int_free_srv_dns_data (struct srv_dns_entry *p) +void +krb5int_free_srv_dns_data (struct srv_dns_entry *p) { struct srv_dns_entry *next; while (p) { diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index dd8110c33..8b3c3ef94 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -156,7 +156,8 @@ void printaddr (struct sockaddr *); -void printaddr (struct sockaddr *sa) +void +printaddr(struct sockaddr *sa) /*@modifies fileSystem@*/ { char buf[NI_MAXHOST]; @@ -195,7 +196,8 @@ is_loopback_address(struct sockaddr *sa) #include #ifdef DEBUG -void printifaddr (struct ifaddrs *ifp) +void +printifaddr(struct ifaddrs *ifp) { printf ("%p={\n", ifp); /* printf ("\tnext=%p\n", ifp->ifa_next); */ diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index df246eff2..468f0df16 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -138,7 +138,8 @@ krb5int_free_addrlist (struct addrlist *lp) } #define free_list krb5int_free_addrlist -static int translate_ai_error (int err) +static int +translate_ai_error (int err) { switch (err) { case 0: @@ -182,7 +183,8 @@ static int translate_ai_error (int err) } #include -static inline void Tprintf(const char *fmt, ...) +static inline void +Tprintf(const char *fmt, ...) { #ifdef TEST va_list ap; @@ -202,8 +204,9 @@ static inline void dprint(const char *fmt, ...) { } static inline void print_addrlist(const struct addrlist *a) { } #endif -static int add_addrinfo_to_list (struct addrlist *lp, struct addrinfo *a, - void (*freefn)(void *), void *data) +static int +add_addrinfo_to_list(struct addrlist *lp, struct addrinfo *a, + void (*freefn)(void *), void *data) { int err; @@ -230,7 +233,8 @@ static int add_addrinfo_to_list (struct addrlist *lp, struct addrinfo *a, #define add_host_to_list krb5int_add_host_to_list -static void call_freeaddrinfo(void *data) +static void +call_freeaddrinfo(void *data) { /* Strict interpretation of the C standard says we can't assume that the ABI for f(void*) and f(struct foo *) will be diff --git a/src/lib/krb5/os/prompter.c b/src/lib/krb5/os/prompter.c index e60403590..aa7399c77 100644 --- a/src/lib/krb5/os/prompter.c +++ b/src/lib/krb5/os/prompter.c @@ -123,7 +123,8 @@ cleanup: return errcode; } -static krb5_sigtype intrfunc(int sig) +static krb5_sigtype +intrfunc(int sig) { got_int = 1; } diff --git a/src/lib/krb5/os/read_pwd.c b/src/lib/krb5/os/read_pwd.c index 3c88a46e6..192c8735b 100644 --- a/src/lib/krb5/os/read_pwd.c +++ b/src/lib/krb5/os/read_pwd.c @@ -92,7 +92,8 @@ typedef struct { int *pwd_size_return; } pwd_params; -void center_dialog(HWND hwnd) +void +center_dialog(HWND hwnd) { int scrwidth, scrheight; int dlgwidth, dlgheight; diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index f12be79f4..001afcec7 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -64,7 +64,8 @@ int krb5int_debug_sendto_kdc = 0; #define debug krb5int_debug_sendto_kdc -static void default_debug_handler (const void *data, size_t len) +static void +default_debug_handler (const void *data, size_t len) { #if 0 static FILE *logfile; @@ -83,11 +84,13 @@ static void default_debug_handler (const void *data, size_t len) void (*krb5int_sendtokdc_debug_handler) (const void *, size_t) = default_debug_handler; -static void put(const void *ptr, size_t len) +static void +put(const void *ptr, size_t len) { (*krb5int_sendtokdc_debug_handler)(ptr, len); } -static void putstr(const char *str) +static void +putstr(const char *str) { put(str, strlen(str)); } @@ -500,7 +503,8 @@ krb5_sendto_kdc (krb5_context context, const krb5_data *message, #include "cm.h" -static int getcurtime (struct timeval *tvp) +static int +getcurtime (struct timeval *tvp) { #ifdef _WIN32 struct _timeb tb; diff --git a/src/lib/krb5/os/t_gifconf.c b/src/lib/krb5/os/t_gifconf.c index 6ae4b85c4..786efa485 100644 --- a/src/lib/krb5/os/t_gifconf.c +++ b/src/lib/krb5/os/t_gifconf.c @@ -77,7 +77,9 @@ #define INIT 0xc3 -int main (void) { +int +main(void) +{ char buffer[2048]; int i, sock, t, olen = -9, omod = -9; struct ifconf ifc; diff --git a/src/lib/krb5/os/t_locate_kdc.c b/src/lib/krb5/os/t_locate_kdc.c index 45fad0176..5d3e8c617 100644 --- a/src/lib/krb5/os/t_locate_kdc.c +++ b/src/lib/krb5/os/t_locate_kdc.c @@ -21,13 +21,15 @@ const char *prog; struct addrlist al; -static void kfatal (krb5_error_code err) +static void +kfatal (krb5_error_code err) { com_err (prog, err, "- exiting"); exit (1); } -static const char *stypename (int stype) +static const char * +stypename (int stype) { static char buf[20]; switch (stype) { @@ -43,7 +45,8 @@ static const char *stypename (int stype) } } -static void print_addrs (void) +static void +print_addrs (void) { int i; @@ -67,7 +70,8 @@ static void print_addrs (void) } } -int main (int argc, char *argv[]) +int +main (int argc, char *argv[]) { char *p, *realmname; krb5_data realm; diff --git a/src/lib/krb5/os/t_realm_iter.c b/src/lib/krb5/os/t_realm_iter.c index 397826940..960318910 100644 --- a/src/lib/krb5/os/t_realm_iter.c +++ b/src/lib/krb5/os/t_realm_iter.c @@ -3,7 +3,8 @@ #include -void test_realm_iterator(int ctx) +void +test_realm_iterator(int ctx) { krb5_error_code retval; char *realm; @@ -26,7 +27,8 @@ void test_realm_iterator(int ctx) } } -int main(int argc, char **argv) +int +main(int argc, char **argv) { krb5_context ctx; krb5_error_code retval; diff --git a/src/lib/krb5/os/t_std_conf.c b/src/lib/krb5/os/t_std_conf.c index a3bd795d4..072ac3058 100644 --- a/src/lib/krb5/os/t_std_conf.c +++ b/src/lib/krb5/os/t_std_conf.c @@ -18,7 +18,8 @@ #include "os-proto.h" -static void test_get_default_realm(krb5_context ctx) +static void +test_get_default_realm(krb5_context ctx) { char *realm; krb5_error_code retval; @@ -32,7 +33,8 @@ static void test_get_default_realm(krb5_context ctx) free(realm); } -static void test_set_default_realm(krb5_context ctx, char *realm) +static void +test_set_default_realm(krb5_context ctx, char *realm) { krb5_error_code retval; @@ -44,7 +46,8 @@ static void test_set_default_realm(krb5_context ctx, char *realm) printf("krb5_set_default_realm(%s)\n", realm); } -static void test_get_default_ccname(krb5_context ctx) +static void +test_get_default_ccname(krb5_context ctx) { const char *ccname; @@ -55,7 +58,8 @@ static void test_get_default_ccname(krb5_context ctx) printf("krb5_cc_default_name() returned NULL\n"); } -static void test_set_default_ccname(krb5_context ctx, char *ccname) +static void +test_set_default_ccname(krb5_context ctx, char *ccname) { krb5_error_code retval; @@ -67,7 +71,8 @@ static void test_set_default_ccname(krb5_context ctx, char *ccname) printf("krb5_set_default_ccname(%s)\n", ccname); } -static void test_get_krbhst(krb5_context ctx, char *realm) +static void +test_get_krbhst(krb5_context ctx, char *realm) { char **hostlist, **cpp; krb5_data rlm; @@ -97,7 +102,8 @@ static void test_get_krbhst(krb5_context ctx, char *realm) printf("\n"); } -static void test_locate_kdc(krb5_context ctx, char *realm) +static void +test_locate_kdc(krb5_context ctx, char *realm) { struct addrlist addrs; int i; @@ -148,7 +154,8 @@ static void test_locate_kdc(krb5_context ctx, char *realm) printf("\n"); } -static void test_get_host_realm(krb5_context ctx, char *host) +static void +test_get_host_realm(krb5_context ctx, char *host) { char **realms, **cpp; krb5_error_code retval; @@ -176,7 +183,8 @@ static void test_get_host_realm(krb5_context ctx, char *host) printf("\n"); } -static void test_get_realm_domain(krb5_context ctx, char *realm) +static void +test_get_realm_domain(krb5_context ctx, char *realm) { krb5_error_code retval; char *domain; @@ -190,14 +198,16 @@ static void test_get_realm_domain(krb5_context ctx, char *realm) free(domain); } -static void usage(char *progname) +static void +usage(char *progname) { fprintf(stderr, "%s: Usage: %s [-dc] [-k realm] [-r host] [-C ccname] [-D realm]\n", progname, progname); exit(1); } -int main(int argc, char **argv) +int +main(int argc, char **argv) { int c; krb5_context ctx; -- 2.26.2