From 1438771124ed4730aca2d722595166e31ecd88c5 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 11 Feb 2013 23:25:13 +0100 Subject: [PATCH 1/1] 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' --- src/ngircd/conn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2