[PATCH] sim: use socklen_t with accept()

Mike Frysinger
2010-03-29T19:38:48Z

The accept() function takes a socklen_t, not an int. Using an int causes:
dv-sockser.c: In function 'connected_p':
dv-sockser.c:273: warning: pointer targets in passing argument 3
of 'accept' differ in signedness

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
2010-03-29 Mike Frysinger <vapier@gentoo.org>

* dv-sockser.c (connected_p): Declare addrlen as socklen_t.

sim/common/dv-sockser.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index 9195190..c584fc7 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -243,7 +243,7 @@ connected_p (SIM_DESC sd)
struct timeval tv;
fd_set readfds;
struct sockaddr sockaddr;
- int addrlen;
+ socklen_t addrlen;

if (sockser_listen_fd == -1)
return 0;
--
1.7.0.2