Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
3c48b909
Commit
3c48b909
authored
Sep 06, 2002
by
Per Cederqvist
Browse files
(initialize): Added casts to remove warnings.
parent
f280f711
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/ramkomd.c
View file @
3c48b909
/*
* $Id: ramkomd.c,v 0.10
0
2002/0
8/20 07:1
3:0
1
ceder Exp $
* $Id: ramkomd.c,v 0.10
1
2002/0
9/06 22:4
3:0
3
ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -382,7 +382,7 @@ initialize(const char *config_file)
if
(
param
.
no_files
!=
-
1
)
{
if
(
param
.
no_files
>
rlim
.
rlim_max
)
if
(
(
rlim_t
)
param
.
no_files
>
rlim
.
rlim_max
)
{
fprintf
(
stderr
,
"attempt to raise open files from %ld to %ld, "
"but only %ld is allowed
\n
"
,
...
...
@@ -423,11 +423,11 @@ initialize(const char *config_file)
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)
/* Check that getrlimit and sysconf/getdtablesize/the compiled default
makes sense. */
if
(
rlim
.
rlim_cur
>
MAX_NO_OF_CONNECTIONS
+
PROTECTED_FDS
)
if
(
rlim
.
rlim_cur
>
(
rlim_t
)(
MAX_NO_OF_CONNECTIONS
+
PROTECTED_FDS
)
)
kom_log
(
"WARNING: getrlimit indicates that %ld files can be open, "
"but MAX_NO_OF_CONNECTIONS is only %ld
\n
"
,
(
long
)
rlim
.
rlim_cur
,
(
long
)
MAX_NO_OF_CONNECTIONS
);
else
if
(
rlim
.
rlim_cur
<
MAX_NO_OF_CONNECTIONS
+
PROTECTED_FDS
)
else
if
(
rlim
.
rlim_cur
<
(
rlim_t
)(
MAX_NO_OF_CONNECTIONS
+
PROTECTED_FDS
)
)
kom_log
(
"warning: getrlimit indicates that only %ld files can be open, "
"but MAX_NO_OF_CONNECTIONS is %ld (this should be harmless)
\n
"
,
(
long
)
rlim
.
rlim_cur
,
(
long
)
MAX_NO_OF_CONNECTIONS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment