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.
This commit is contained in:
parent
e5fea5380d
commit
8a94ec9728
|
@ -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\".",
|
||||
|
|
Loading…
Reference in New Issue