Convert remaining old-style function definitions

This commit is contained in:
William Robinet 2023-08-14 12:24:38 +02:00
parent ec44fa4493
commit 9012f9cf48
No known key found for this signature in database
GPG key ID: 003FA3DF74C7A949
3 changed files with 31 additions and 37 deletions

View file

@ -101,16 +101,16 @@ struct timeval last_packet_seen_time = // Timestamp of the last packet of the
logger_mod *logger=NULL; logger_mod *logger=NULL;
int err_exit(str,num) int
char *str; err_exit (char *str, int num)
int num;
{ {
fprintf(stderr,"ERROR: %s\n",str); fprintf(stderr,"ERROR: %s\n",str);
sig_handler(SIGQUIT); sig_handler(SIGQUIT);
exit(num); exit(num);
} }
int usage() int
usage (void)
{ {
fprintf(stderr,"Usage: ssldump [-r dumpfile] [-i interface] [-l sslkeylogfile] [-w outpcapfile]\n"); fprintf(stderr,"Usage: ssldump [-r dumpfile] [-i interface] [-l sslkeylogfile] [-w outpcapfile]\n");
fprintf(stderr," [-k keyfile] [-p password] [-vtaTznsAxVNde]\n"); fprintf(stderr," [-k keyfile] [-p password] [-vtaTznsAxVNde]\n");
@ -118,7 +118,8 @@ int usage()
exit(0); exit(0);
} }
int print_version() int
print_version (void)
{ {
printf("Version: @ssldump_VERSION@ (@ssldump_DESCRIPTION@)\n"); printf("Version: @ssldump_VERSION@ (@ssldump_DESCRIPTION@)\n");
printf("Maintained by a bunch of volunteers, see https://github.com/adulau/ssldump/blob/master/CREDITS\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); exit(sig);
} }
void pcap_cb(ptr,hdr,data) void pcap_cb(u_char *ptr, const struct pcap_pkthdr *hdr, const u_char *data)
u_char *ptr;
const struct pcap_pkthdr *hdr;
const u_char *data;
{ {
n_handler *n; n_handler *n;
int len; int len;
@ -311,9 +309,8 @@ static module_def modules[]={
int parse_ssl_flag PROTO_LIST((int c)); int parse_ssl_flag PROTO_LIST((int c));
int main(argc,argv) int
int argc; main (int argc, char **argv)
char **argv;
{ {
int r; int r;
#ifdef _WIN32 #ifdef _WIN32
@ -546,9 +543,8 @@ int main(argc,argv)
} }
char *collapse_args(argc,argv) char *
int argc; collapse_args (int argc, char **argv)
char **argv;
{ {
int i,len=0; int i,len=0;
char *ret; char *ret;

View file

@ -230,14 +230,14 @@ r_assoc_fetch (r_assoc *assoc, char *key, int len, void **datap)
return(0); return(0);
} }
int r_assoc_insert(assoc,key,len,data,copy,destroy,how) int r_assoc_insert(
r_assoc *assoc; r_assoc *assoc,
char *key; char *key,
int len; int len,
void *data; void *data,
int (*copy) PROTO_LIST((void **new,void *old)); int (*copy) PROTO_LIST((void **new,void *old)),
int (*destroy) PROTO_LIST((void *ptr)); int (*destroy) PROTO_LIST((void *ptr)),
int how; int how)
{ {
r_assoc_el *bucket,*new_bucket=0; r_assoc_el *bucket,*new_bucket=0;
int r,_status; int r,_status;

View file

@ -677,12 +677,11 @@ ssl_process_client_key_exchange (ssl_obj *ssl, ssl_decoder *d, UCHAR *msg, int l
#ifdef OPENSSL #ifdef OPENSSL
static int tls_P_hash(ssl,secret,seed,md,out) static int tls_P_hash(ssl_obj *ssl,
ssl_obj *ssl; Data *secret,
Data *secret; Data *seed,
Data *seed; const EVP_MD *md,
const EVP_MD *md; Data *out)
Data *out;
{ {
UCHAR *ptr=out->data; UCHAR *ptr=out->data;
int left=out->len; int left=out->len;
@ -1066,14 +1065,13 @@ ssl_generate_keying_material (ssl_obj *ssl, ssl_decoder *d)
return(_status); return(_status);
} }
static int hkdf_expand_label(ssl,d,secret,label,context,length,out) static int hkdf_expand_label(ssl_obj *ssl,
ssl_obj *ssl; ssl_decoder *d,
ssl_decoder *d; Data *secret,
Data *secret; char *label,
char *label; Data *context,
Data *context; uint16_t length,
uint16_t length; UCHAR **out)
UCHAR **out;
{ {
int r; int r;
size_t outlen = length; size_t outlen = length;