mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
daemon.c: pid_t is not int.
Reported by Morten Welinder <mwelinder@gmail.com>. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
348c4c66da
commit
1bedd4ca21
2
daemon.c
2
daemon.c
@ -22,7 +22,7 @@ static void logreport(const char *err, va_list params)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user