Module: ngircd.git Branch: master Commit: 8a94ec9728cef27c0b1e3a7df62f5530c6394308 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=8a94e...
Author: Florian Westphal fw@strlen.de Date: Wed Dec 17 22:55:20 2008 +0100
don't print pid_t type with %ld format specifier
Reported by Christoph Biedl: ngircd[21581]: Running as user irc(39), group irc(39), with PID 140733193409613.
cast pid_t to long to avoid this. While we are there, cast uid_t and gid_t, too.
---
src/ngircd/ngircd.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 1f7969d..b564295 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -828,9 +828,9 @@ NGIRCd_Init( bool NGIRCd_NoDaemon ) pwd = getpwuid( Conf_UID ); grp = getgrgid( Conf_GID );
- Log( LOG_INFO, "Running as user %s(%ld), group %s(%ld), with PID %ld.", - pwd ? pwd->pw_name : "unknown", Conf_UID, - grp ? grp->gr_name : "unknown", Conf_GID, pid); + Log(LOG_INFO, "Running as user %s(%ld), group %s(%ld), with PID %ld.", + pwd ? pwd->pw_name : "unknown", (long)Conf_UID, + grp ? grp->gr_name : "unknown", (long)Conf_GID, (long)pid);
if (chrooted) { Log(LOG_INFO, "Running with root directory "%s".",