Commit 3c48b909 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(initialize): Added casts to remove warnings.

parent f280f711
/*
* $Id: ramkomd.c,v 0.100 2002/08/20 07:13:01 ceder Exp $
* $Id: ramkomd.c,v 0.101 2002/09/06 22:43:03 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment