summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
authorkeramida <keramida@FreeBSD.org>2006-03-04 15:20:28 +0000
committerkeramida <keramida@FreeBSD.org>2006-03-04 15:20:28 +0000
commit4465edc46a4fbfaff093c39eb57c9c912147dd35 (patch)
tree313a427532fe77c8e85e64f0cf8a04f6ef048c66 /lib/libutil
parenta973f189234fb2e1e5d0ac8221b55f713bf797eb (diff)
downloadFreeBSD-src-4465edc46a4fbfaff093c39eb57c9c912147dd35.zip
FreeBSD-src-4465edc46a4fbfaff093c39eb57c9c912147dd35.tar.gz
Use `intmax_t' instead of plain `int' for pid_t casts.
Useful tips from: ru, bde Approved by: pjd MFC after: 3 days
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/pidfile.36
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3
index 4895975..64f77b0 100644
--- a/lib/libutil/pidfile.3
+++ b/lib/libutil/pidfile.3
@@ -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;
}
}
OpenPOWER on IntegriCloud