diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2009-06-14 16:25:33 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-06-14 16:25:33 +0000 |
commit | ccacf84f7602946c76944aae6ce1d5e2aa2b4814 (patch) | |
tree | e95ee463e16d02ced5c39a62a111ce70ca36f8b6 /ax25rtd | |
parent | cd98bf42c5ab3cb061a32068d866616c71c40bf9 (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 'ax25rtd')
-rw-r--r-- | ax25rtd/ax25rtd.c | 8 | ||||
-rw-r--r-- | ax25rtd/listener.c | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/ax25rtd/ax25rtd.c b/ax25rtd/ax25rtd.c index 39d2959..4d22c47 100644 --- a/ax25rtd/ax25rtd.c +++ b/ax25rtd/ax25rtd.c @@ -1,4 +1,4 @@ -/* $Id: ax25rtd.c,v 1.5 2006/10/05 11:50:39 dl9sau Exp $ +/* $Id: ax25rtd.c,v 1.6 2009/06/14 16:25:33 ralf Exp $ * * Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com) * @@ -66,7 +66,7 @@ #include "../pathnames.h" #include "ax25rtd.h" -const char *Version = "ax25rtd $Revision: 1.5 $"; +const char *Version = "ax25rtd $Revision: 1.6 $"; config *Config = NULL; int reload = 0; @@ -137,8 +137,8 @@ void daemon_shutdown(int reason) int main(int argc, char **argv) { unsigned char buf[256]; - int size, s; - int cntrl_s, cntrl_fd, cntrl_len; + int size, s, cntrl_s, cntrl_fd; + socklen_t cntrl_len; struct sockaddr_un cntrl_addr; fd_set read_fds, write_fds; int fd_max; diff --git a/ax25rtd/listener.c b/ax25rtd/listener.c index 44a0601..051d8c9 100644 --- a/ax25rtd/listener.c +++ b/ax25rtd/listener.c @@ -1,4 +1,4 @@ -/* $Id: listener.c,v 1.5 2006/10/05 11:50:39 dl9sau Exp $ +/* $Id: listener.c,v 1.6 2009/06/14 16:25:33 ralf Exp $ * * Copyright (c) 1996 Jörg Reuter (jreuter@poboxes.com) * @@ -394,10 +394,11 @@ void ax25_receive(int sock) struct sockaddr sa; ax25_address srccall, destcall, digipeater[AX25_MAX_DIGIS]; char extseq = 0; - int size, asize, action, ipmode, ctl, pid, ndigi, kdigi, mine; + int size, action, ipmode, ctl, pid, ndigi, kdigi, mine; time_t stamp; config *config; ax25_rt_entry *ax25rt; + socklen_t asize; asize = sizeof(sa); if ((size = recvfrom(sock, buf, sizeof(buf), 0, &sa, &asize)) < 0) { |