@matheusbsbs / matheus-bagliano / commits / 1bedd4ca21
Fork 0

daemon.c: pid_t is not int.

Reported by Morten Welinder <mwelinder@gmail.com>. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Sep 23, 2005 at 23:26 UTC 1bedd4ca2130c3b8c6d9a68cbbaa29e053269a66
1 file changed +1 -1
daemon.c
+1 -1
@@ -22,7 +22,7 @@ static void logreport(const char *err, va_list params)
22 int maxlen, msglen;
23
24 /* sizeof(buf) should be big enough for "[pid] \n" */
25 - buflen = snprintf(buf, sizeof(buf), "[%d] ", getpid());
25 + buflen = snprintf(buf, sizeof(buf), "[%ld] ", (long) getpid());
26
27 maxlen = sizeof(buf) - buflen - 1; /* -1 for our own LF */
28 msglen = vsnprintf(buf + buflen, maxlen, err, params);