Commit 9db7876f 9db7876faba3f86efe0535432c4f7d74057c1dc1 by Sergey Poznyakoff

Cast third argument to accept() to socklen_t*. Add typecasts to the arguments of…

… printf-like functions where necessary
1 parent c7b72e28
......@@ -171,7 +171,7 @@ main (int argc, char **argv)
/* Redirect any stdout error from the library to syslog, they
should not go to the client. */
mu_error_set_print (mu_syslog_error_printer);
umask (S_IROTH | S_IWOTH | S_IXOTH); /* 007 */
/* Actually run the daemon. */
......@@ -313,11 +313,13 @@ imap4d_daemon (unsigned int maxchildren, unsigned int port)
{
if (children > maxchildren)
{
syslog (LOG_ERR, "too many children (%d)", children);
syslog (LOG_ERR, "too many children (%lu)",
(unsigned long) children);
pause ();
continue;
}
connfd = accept (listenfd, (struct sockaddr *)&client, &size);
connfd = accept (listenfd, (struct sockaddr *)&client,
(socklen_t*) &size);
if (connfd == -1)
{
if (errno == EINTR)
......
......@@ -397,11 +397,13 @@ pop3d_daemon (unsigned int maxchildren, unsigned int port)
{
if (children > maxchildren)
{
syslog (LOG_ERR, "too many children (%d)", children);
syslog (LOG_ERR, "too many children (%lu)",
(unsigned long) children);
pause ();
continue;
}
connfd = accept (listenfd, (struct sockaddr *)&client, &size);
connfd = accept (listenfd, (struct sockaddr *)&client,
(socklen_t *) &size);
if (connfd == -1)
{
if (errno == EINTR)
......