From: Petr Baudis Date: Sat, 24 Sep 2005 14:12:56 GMT Subject: [PATCH 1/4] Fix git-daemon's pid_t logging Message-ID: <20050924141256.8423.53339.stgit@machine.or.cz> In-Reply-To: <20050924141254.8423.80265.stgit@machine.or.cz> git-daemon's logging code did not properly printf() pid_t - we need to explicitly typecast it, since it might not be int. Pointed out by Morten Welinder. Signed-off-by: Petr Baudis --- daemon.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/daemon.c b/daemon.c --- a/daemon.c +++ b/daemon.c @@ -22,7 +22,7 @@ static void logreport(const char *err, v int maxlen, msglen; /* sizeof(buf) should be big enough for "[pid] \n" */ - buflen = snprintf(buf, sizeof(buf), "[%d] ", getpid()); + buflen = snprintf(buf, sizeof(buf), "[%ld] ", (long) getpid()); maxlen = sizeof(buf) - buflen - 1; /* -1 for our own LF */ msglen = vsnprintf(buf + buflen, maxlen, err, params);