From: Alexander Barton Date: Mon, 11 Feb 2013 22:25:13 +0000 (+0100) Subject: my_sd_listen_fds(): really return an "int" X-Git-Tag: rel-21-rc1~138 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git;a=commitdiff_plain;h=1438771124ed4730aca2d722595166e31ecd88c5;hp=b95dfb3ffd798e00df54b52496963d2a998ccbb0 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' --- diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index 3a430428..3c1427d5 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -139,7 +139,7 @@ static int my_sd_listen_fds(void) { const char *e; - long count; + int count; /* Check if LISTEN_PID exists; but we ignore the result, because * normally ngircd forks a child before checking this, and therefore @@ -151,7 +151,7 @@ my_sd_listen_fds(void) e = getenv("LISTEN_FDS"); if (!e || !*e) return -1; - count = atol(e); + count = atoi(e); unsetenv("LISTEN_FDS"); return count;