summaryrefslogtreecommitdiffstats
path: root/tcpip
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2009-06-14 16:25:26 +0000
committerRalf Baechle <ralf@linux-mips.org>2009-06-14 16:25:26 +0000
commit49db7b428a4752749fb421bfbe50946cafa2fc3f (patch)
tree66b2225fa378df22ad147c278b9b94110a22c3c2 /tcpip
parenta7c513d8dc2f4dc2f9a7ae91736f2f2870f2c892 (diff)
Fix type of length argument to sockset syscalls.
Various socket syscalls receive a length argument that should be a socklen_t rsp. a ptr to a socklen_t but instead int rsp. ptr to int were being passed. While in theory this was a bug it's harmless as dangerously large values would not be used but the issue manifested itself in a significant number of compilation warnings.
Diffstat (limited to 'tcpip')
-rw-r--r--tcpip/rip98r.c3
-rw-r--r--tcpip/ttylinkd.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/tcpip/rip98r.c b/tcpip/rip98r.c
index 25cb546..9a623ff 100644
--- a/tcpip/rip98r.c
+++ b/tcpip/rip98r.c
@@ -82,7 +82,8 @@ void receive_routes(int s)
unsigned long int netmask;
unsigned long int network;
int bits, metric;
- int size, found, matched;
+ int found, matched;
+ socklen_t size;
int mess_len;
int i;
diff --git a/tcpip/ttylinkd.c b/tcpip/ttylinkd.c
index 032a5bd..234b7fd 100644
--- a/tcpip/ttylinkd.c
+++ b/tcpip/ttylinkd.c
@@ -106,7 +106,6 @@ int main(int argc, char *argv[])
struct sockaddr_in ctl_sin;
struct in_addr my_addr, rem_addr;
int ctl_skt, skt, new_skt;
- int length;
CTL_RESPONSE resp;
CTL_MSG msg;
struct protoent *ppe;
@@ -116,10 +115,11 @@ int main(int argc, char *argv[])
char buf[256];
char user[NAME_SIZE];
struct sockaddr sa, msg_sa;
- int sa_len, i;
struct sockaddr_in *peer_sin=NULL, *msg_sin;
struct sockaddr_ax25 *peer_sax;
struct sockaddr_rose *peer_srose;
+ socklen_t sa_len, length;
+ int i;
/* Open up the system logger */
openlog(argv[0], LOG_PID, LOG_DAEMON);