diff --git a/base/pcap-snoop.c.in b/base/pcap-snoop.c.in index c25e9b0..672cf19 100644 --- a/base/pcap-snoop.c.in +++ b/base/pcap-snoop.c.in @@ -101,16 +101,16 @@ struct timeval last_packet_seen_time = // Timestamp of the last packet of the logger_mod *logger=NULL; -int err_exit(str,num) - char *str; - int num; +int +err_exit (char *str, int num) { fprintf(stderr,"ERROR: %s\n",str); sig_handler(SIGQUIT); exit(num); } -int usage() +int +usage (void) { fprintf(stderr,"Usage: ssldump [-r dumpfile] [-i interface] [-l sslkeylogfile] [-w outpcapfile]\n"); fprintf(stderr," [-k keyfile] [-p password] [-vtaTznsAxVNde]\n"); @@ -118,7 +118,8 @@ int usage() exit(0); } -int print_version() +int +print_version (void) { printf("Version: @ssldump_VERSION@ (@ssldump_DESCRIPTION@)\n"); printf("Maintained by a bunch of volunteers, see https://github.com/adulau/ssldump/blob/master/CREDITS\n"); @@ -162,10 +163,7 @@ void sig_handler(int sig) exit(sig); } -void pcap_cb(ptr,hdr,data) - u_char *ptr; - const struct pcap_pkthdr *hdr; - const u_char *data; +void pcap_cb(u_char *ptr, const struct pcap_pkthdr *hdr, const u_char *data) { n_handler *n; int len; @@ -311,9 +309,8 @@ static module_def modules[]={ int parse_ssl_flag PROTO_LIST((int c)); -int main(argc,argv) - int argc; - char **argv; +int +main (int argc, char **argv) { int r; #ifdef _WIN32 @@ -546,9 +543,8 @@ int main(argc,argv) } -char *collapse_args(argc,argv) - int argc; - char **argv; +char * +collapse_args (int argc, char **argv) { int i,len=0; char *ret; diff --git a/common/lib/r_assoc.c b/common/lib/r_assoc.c index 43395ad..edce3a7 100644 --- a/common/lib/r_assoc.c +++ b/common/lib/r_assoc.c @@ -230,14 +230,14 @@ r_assoc_fetch (r_assoc *assoc, char *key, int len, void **datap) return(0); } -int r_assoc_insert(assoc,key,len,data,copy,destroy,how) - r_assoc *assoc; - char *key; - int len; - void *data; - int (*copy) PROTO_LIST((void **new,void *old)); - int (*destroy) PROTO_LIST((void *ptr)); - int how; +int r_assoc_insert( + r_assoc *assoc, + char *key, + int len, + void *data, + int (*copy) PROTO_LIST((void **new,void *old)), + int (*destroy) PROTO_LIST((void *ptr)), + int how) { r_assoc_el *bucket,*new_bucket=0; int r,_status; diff --git a/ssl/ssldecode.c b/ssl/ssldecode.c index 1d28fc0..7bfb4b2 100644 --- a/ssl/ssldecode.c +++ b/ssl/ssldecode.c @@ -677,12 +677,11 @@ ssl_process_client_key_exchange (ssl_obj *ssl, ssl_decoder *d, UCHAR *msg, int l #ifdef OPENSSL -static int tls_P_hash(ssl,secret,seed,md,out) - ssl_obj *ssl; - Data *secret; - Data *seed; - const EVP_MD *md; - Data *out; +static int tls_P_hash(ssl_obj *ssl, + Data *secret, + Data *seed, + const EVP_MD *md, + Data *out) { UCHAR *ptr=out->data; int left=out->len; @@ -1066,14 +1065,13 @@ ssl_generate_keying_material (ssl_obj *ssl, ssl_decoder *d) return(_status); } -static int hkdf_expand_label(ssl,d,secret,label,context,length,out) - ssl_obj *ssl; - ssl_decoder *d; - Data *secret; - char *label; - Data *context; - uint16_t length; - UCHAR **out; +static int hkdf_expand_label(ssl_obj *ssl, + ssl_decoder *d, + Data *secret, + char *label, + Data *context, + uint16_t length, + UCHAR **out) { int r; size_t outlen = length;