mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-13 04:03:56 +00:00
my_sd_listen_fds(): really return an "int"
This fixes the following warning using Apple LLVM version 4.2
(clang-425.0.24) on OS X:
src/ngircd/conn.c:157:9: Implicit conversion loses integer
precision: 'long' to 'int'
This commit is contained in:
@@ -139,7 +139,7 @@ static int
|
|||||||
my_sd_listen_fds(void)
|
my_sd_listen_fds(void)
|
||||||
{
|
{
|
||||||
const char *e;
|
const char *e;
|
||||||
long count;
|
int count;
|
||||||
|
|
||||||
/* Check if LISTEN_PID exists; but we ignore the result, because
|
/* Check if LISTEN_PID exists; but we ignore the result, because
|
||||||
* normally ngircd forks a child before checking this, and therefore
|
* normally ngircd forks a child before checking this, and therefore
|
||||||
@@ -151,7 +151,7 @@ my_sd_listen_fds(void)
|
|||||||
e = getenv("LISTEN_FDS");
|
e = getenv("LISTEN_FDS");
|
||||||
if (!e || !*e)
|
if (!e || !*e)
|
||||||
return -1;
|
return -1;
|
||||||
count = atol(e);
|
count = atoi(e);
|
||||||
unsetenv("LISTEN_FDS");
|
unsetenv("LISTEN_FDS");
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|||||||
Reference in New Issue
Block a user