From ef608a60087fcf462e85395fa22860a298cbecfc Mon Sep 17 00:00:00 2001 From: Giorgos Keramidas Date: Sat, 4 Mar 2006 15:20:28 +0000 Subject: [PATCH] Use `intmax_t' instead of plain `int' for pid_t casts. Useful tips from: ru, bde Approved by: pjd MFC after: 3 days --- lib/libutil/pidfile.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3 index 4895975e3f7..64f77b05e92 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; } }