Subject: [PATCH] Fix gcc-4 warning in accept() call

From: Pavel Roskin <[email-masked]>
Date: Thu, 29 Sep 2005 17:05:01 -0400

Fix gcc-4 warning in accept() call

gcc-4 warns about sign mismatch in pointers.  Third argument in accept()
is socklen_t, which is unsigned.  Since Linus doesn't like socklen_t
(see commit 7fa090844f7d1624c7d1ffc621aae6aec84a1110), let's use
unsigned int.

Signed-off-by: Pavel Roskin <[email-masked]>

diff --git a/daemon.c b/daemon.c
--- a/daemon.c
+++ b/daemon.c
@@ -459,7 +459,7 @@ static int serve(int port)
 
 			if (FD_ISSET(sockfd, &fds)) {
 				struct sockaddr_storage ss;
-				int sslen = sizeof(ss);
+				unsigned int sslen = sizeof(ss);
 				int incoming = accept(sockfd, (struct sockaddr *)&ss, &sslen);
 				if (incoming < 0) {
 					switch (errno) {

-- 
Regards,
Pavel Roskin