Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] sim: use socklen_t with accept()
@ 2010-03-29 19:38 Mike Frysinger
  2010-03-30 16:11 ` Tom Tromey
  0 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2010-03-29 19:38 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-03-30 23:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29 19:38 [PATCH] sim: use socklen_t with accept() Mike Frysinger
2010-03-30 16:11 ` Tom Tromey
2010-03-30 18:42   ` Andreas Schwab
2010-03-30 22:08     ` [PATCH v2] " Mike Frysinger
2010-03-30 22:22       ` Tom Tromey
2010-03-30 22:39         ` [PATCH v3] " Mike Frysinger
2010-03-30 23:04           ` Tom Tromey
2010-03-30 22:39         ` [PATCH v2] " Mike Frysinger
2010-03-30 23:03           ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox