diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-09-06 19:52:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-09-06 19:52:31 +0000 |
commit | eaeb5fb5039b6d96bf2799770a0bf6cf06f1fbfc (patch) | |
tree | a5792cf8425aa61f5b5850480d549ceb54de9166 | |
parent | 2838082537c9c9631397a803467b78e48774a196 (diff) |
socklen_t use; pvalchev ok
-rw-r--r-- | usr.sbin/bootpd/bootpd.c | 5 | ||||
-rw-r--r-- | usr.sbin/bootpd/bootpgw.c | 5 | ||||
-rw-r--r-- | usr.sbin/bootpd/bootptest.c | 5 | ||||
-rw-r--r-- | usr.sbin/bootpd/getether.c | 3 | ||||
-rw-r--r-- | usr.sbin/dhcp/common/icmp.c | 8 | ||||
-rw-r--r-- | usr.sbin/dhcp/common/socket.c | 2 | ||||
-rw-r--r-- | usr.sbin/dhcp/dhclient/dhclient.c | 4 | ||||
-rw-r--r-- | usr.sbin/dhcp/includes/dhcpd.h | 4 | ||||
-rw-r--r-- | usr.sbin/dhcp/relay/dhcrelay.c | 4 | ||||
-rw-r--r-- | usr.sbin/dhcp/server/dhcpd.c | 4 |
10 files changed, 24 insertions, 20 deletions
diff --git a/usr.sbin/bootpd/bootpd.c b/usr.sbin/bootpd/bootpd.c index e95741ebdfb..23216ca8a0a 100644 --- a/usr.sbin/bootpd/bootpd.c +++ b/usr.sbin/bootpd/bootpd.c @@ -21,7 +21,7 @@ SOFTWARE. ************************************************************************/ #ifndef lint -static char rcsid[] = "$Id: bootpd.c,v 1.10 2002/05/27 19:49:58 deraadt Exp $"; +static char rcsid[] = "$Id: bootpd.c,v 1.11 2002/09/06 19:52:26 deraadt Exp $"; #endif /* @@ -195,7 +195,8 @@ main(argc, argv) struct servent *servp; struct hostent *hep; char *stmp; - int n, ba_len, ra_len; + int n; + socklen_t ba_len, ra_len; int nfound, readfds; int standalone; diff --git a/usr.sbin/bootpd/bootpgw.c b/usr.sbin/bootpd/bootpgw.c index 5cbdaaf6a7f..a15a428c33b 100644 --- a/usr.sbin/bootpd/bootpgw.c +++ b/usr.sbin/bootpd/bootpgw.c @@ -26,7 +26,7 @@ SOFTWARE. ************************************************************************/ #ifndef lint -static char rcsid[] = "$Id: bootpgw.c,v 1.3 1998/11/28 04:07:23 millert Exp $"; +static char rcsid[] = "$Id: bootpgw.c,v 1.4 2002/09/06 19:52:26 deraadt Exp $"; #endif /* @@ -161,7 +161,8 @@ main(argc, argv) struct servent *servp; struct hostent *hep; char *stmp; - int n, ba_len, ra_len; + int n; + socklen_t ba_len, ra_len; int nfound, readfds; int standalone; diff --git a/usr.sbin/bootpd/bootptest.c b/usr.sbin/bootpd/bootptest.c index bae807e1688..05c649deb9a 100644 --- a/usr.sbin/bootpd/bootptest.c +++ b/usr.sbin/bootpd/bootptest.c @@ -73,7 +73,7 @@ unsigned char *packetp; unsigned char *snapend; int snaplen; -extern int getether(char *ifname, char *eap); +extern int getether(char *ifname, u_char *eap); extern int send_request(int s); /* * IP port numbers for client and server obtained from /etc/services @@ -129,7 +129,8 @@ main(argc, argv) char *vendor_file = NULL; char *bp_file = NULL; int s; /* Socket file descriptor */ - int n, tolen, fromlen, recvcnt; + int n, tolen, recvcnt; + socklen_t fromlen; int use_hwa = 0; int32 vend_magic; int32 xid; diff --git a/usr.sbin/bootpd/getether.c b/usr.sbin/bootpd/getether.c index 34f172800b5..e47664c9d24 100644 --- a/usr.sbin/bootpd/getether.c +++ b/usr.sbin/bootpd/getether.c @@ -33,7 +33,8 @@ #include <net/if.h> /* struct ifdevea */ getether(ifname, eap) - char *ifname, *eap; + char *ifname; + u_char *eap; { int rc = -1; int fd; diff --git a/usr.sbin/dhcp/common/icmp.c b/usr.sbin/dhcp/common/icmp.c index c554e80c8d9..8a215e862e1 100644 --- a/usr.sbin/dhcp/common/icmp.c +++ b/usr.sbin/dhcp/common/icmp.c @@ -131,14 +131,14 @@ void icmp_echoreply (protocol) struct icmp *icfrom; struct sockaddr_in from; u_int8_t icbuf [1500]; - int status; - int len; + int status, len; + socklen_t salen; struct iaddr ia; void (*handler) PROTO ((struct iaddr, u_int8_t *, int)); - len = sizeof from; + salen = sizeof from; status = recvfrom (protocol -> fd, (char *)icbuf, sizeof icbuf, 0, - (struct sockaddr *)&from, &len); + (struct sockaddr *)&from, &salen); if (status < 0) { warn ("icmp_echoreply: %m"); return; diff --git a/usr.sbin/dhcp/common/socket.c b/usr.sbin/dhcp/common/socket.c index 711b22dc833..13204ddcbd1 100644 --- a/usr.sbin/dhcp/common/socket.c +++ b/usr.sbin/dhcp/common/socket.c @@ -142,7 +142,7 @@ void fallback_discard (protocol) { char buf [1540]; struct sockaddr_in from; - int flen = sizeof from; + socklen_t flen = sizeof from; int status; struct interface_info *interface = protocol -> local; diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c index 4032192d763..162f100591c 100644 --- a/usr.sbin/dhcp/dhclient/dhclient.c +++ b/usr.sbin/dhcp/dhclient/dhclient.c @@ -117,9 +117,9 @@ static int res_hnok(const char *dn); char *option_as_string (unsigned int code, unsigned char *data, int len); -int main (argc, argv, envp) +int main (argc, argv) int argc; - char **argv, **envp; + char **argv; { int i, fd; struct servent *ent; diff --git a/usr.sbin/dhcp/includes/dhcpd.h b/usr.sbin/dhcp/includes/dhcpd.h index 808893647f8..16c1ec7382f 100644 --- a/usr.sbin/dhcp/includes/dhcpd.h +++ b/usr.sbin/dhcp/includes/dhcpd.h @@ -300,7 +300,7 @@ struct client_config { otherwise default. */ ACTION_SUPERSEDE, /* Always use default. */ ACTION_PREPEND, /* Prepend default to server. */ - ACTION_APPEND, /* Append default to server. */ + ACTION_APPEND /* Append default to server. */ } default_actions [256]; struct option_data send_options [256]; /* Send these to server. */ @@ -513,7 +513,7 @@ extern char *path_dhcpd_conf; extern char *path_dhcpd_db; extern char *path_dhcpd_pid; -int main PROTO ((int, char **, char **)); +int main PROTO ((int, char **)); void cleanup PROTO ((void)); void lease_pinged PROTO ((struct iaddr, u_int8_t *, int)); void lease_ping_timeout PROTO ((void *)); diff --git a/usr.sbin/dhcp/relay/dhcrelay.c b/usr.sbin/dhcp/relay/dhcrelay.c index c001710f870..46d18c3eb90 100644 --- a/usr.sbin/dhcp/relay/dhcrelay.c +++ b/usr.sbin/dhcp/relay/dhcrelay.c @@ -76,9 +76,9 @@ static char message [] = "Internet Software Consortium DHCP Relay Agent"; static char contrib [] = "Please contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html"; -int main (argc, argv, envp) +int main (argc, argv) int argc; - char **argv, **envp; + char **argv; { int i; struct servent *ent; diff --git a/usr.sbin/dhcp/server/dhcpd.c b/usr.sbin/dhcp/server/dhcpd.c index 1a7582ed528..eff62fd6047 100644 --- a/usr.sbin/dhcp/server/dhcpd.c +++ b/usr.sbin/dhcp/server/dhcpd.c @@ -73,9 +73,9 @@ char *path_dhcpd_conf = _PATH_DHCPD_CONF; char *path_dhcpd_db = _PATH_DHCPD_DB; char *path_dhcpd_pid = _PATH_DHCPD_PID; -int main (argc, argv, envp) +int main (argc, argv) int argc; - char **argv, **envp; + char **argv; { int i, status; struct servent *ent; |