Use intmax_t' instead of plain
int' for pid_t casts.
Useful tips from: ru, bde Approved by: pjd MFC after: 3 days
This commit is contained in:
parent
5a8199e142
commit
ef608a6008
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156280
@ -120,8 +120,8 @@ pid_t otherpid, childpid;
|
||||
pfh = pidfile_open("/var/run/daemon.pid", 0600, &otherpid);
|
||||
if (pfh == NULL) {
|
||||
if (errno == EEXIST) {
|
||||
errx(EXIT_FAILURE, "Daemon already running, pid: %d.",
|
||||
(int)otherpid);
|
||||
errx(EXIT_FAILURE, "Daemon already running, pid: %jd.",
|
||||
(intmax_t)otherpid);
|
||||
}
|
||||
/* If we cannot create pidfile from other reasons, only warn. */
|
||||
warn("Cannot open or create pidfile");
|
||||
@ -147,7 +147,7 @@ for (;;) {
|
||||
/* Do child work. */
|
||||
break;
|
||||
default:
|
||||
syslog(LOG_INFO, "Child %d started.", (int)childpid);
|
||||
syslog(LOG_INFO, "Child %jd started.", (intmax_t)childpid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user