diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2009-06-14 16:25:26 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-06-14 16:25:26 +0000 |
commit | 49db7b428a4752749fb421bfbe50946cafa2fc3f (patch) | |
tree | 66b2225fa378df22ad147c278b9b94110a22c3c2 /ax25/rxecho.c | |
parent | a7c513d8dc2f4dc2f9a7ae91736f2f2870f2c892 (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 'ax25/rxecho.c')
-rw-r--r-- | ax25/rxecho.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ax25/rxecho.c b/ax25/rxecho.c index 525e098..e299f2c 100644 --- a/ax25/rxecho.c +++ b/ax25/rxecho.c @@ -369,7 +369,7 @@ int main(int argc, char **argv) #ifdef USE_SOCKADDR_SLL struct sockaddr_ll sll; struct sockaddr *psa = (struct sockaddr *)&sll; - const int sa_len = sizeof(struct sockaddr_ll); + const socklen_t sa_len = sizeof(struct sockaddr_ll); int from_idx; #else #ifdef USE_SOCKADDR_SPKT @@ -383,7 +383,8 @@ int main(int argc, char **argv) #endif char from_dev_name[sizeof(psa->sa_data)]; #endif - int s, size, alen; + int s, size; + socklen_t alen; unsigned char buf[1500]; struct config *p, *list; |