summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-28 01:23:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-28 01:23:14 +0000
commitffb5f179cffd3f7f5654cd9059e74771d8001d2d (patch)
treea15aea803dc87804f4b9d7beb8cf9bbacd13f0ba
parent1d001aed0375036ab02d58274c10235e1ec37d91 (diff)
pid_t wiht %ld and (long)
-rw-r--r--usr.sbin/named/named/db_dump.c8
-rw-r--r--usr.sbin/named/named/ns_main.c6
-rw-r--r--usr.sbin/named/named/ns_maint.c36
-rw-r--r--usr.sbin/named/named/ns_req.c10
4 files changed, 31 insertions, 29 deletions
diff --git a/usr.sbin/named/named/db_dump.c b/usr.sbin/named/named/db_dump.c
index 76e9c4fcbf5..ee6390a14a1 100644
--- a/usr.sbin/named/named/db_dump.c
+++ b/usr.sbin/named/named/db_dump.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: db_dump.c,v 1.5 2002/02/16 21:28:06 millert Exp $ */
+/* $OpenBSD: db_dump.c,v 1.6 2002/05/28 01:23:13 deraadt Exp $ */
#if !defined(lint) && !defined(SABER)
#if 0
static char sccsid[] = "@(#)db_dump.c 4.33 (Berkeley) 3/3/91";
static char rcsid[] = "$From: db_dump.c,v 8.19 1996/10/08 04:51:03 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: db_dump.c,v 1.5 2002/02/16 21:28:06 millert Exp $";
+static char rcsid[] = "$OpenBSD: db_dump.c,v 1.6 2002/05/28 01:23:13 deraadt Exp $";
#endif
#endif /* not lint */
@@ -314,9 +314,9 @@ zt_dump(fp)
fprintf(fp, ";\trefresh=%u, retry=%u, expire=%u, minimum=%u\n",
zp->z_refresh, zp->z_retry,
zp->z_expire, zp->z_minimum);
- fprintf(fp, ";\tftime=%lu, xaddr=[%s], state=%04x, pid=%d\n",
+ fprintf(fp, ";\tftime=%lu, xaddr=[%s], state=%04x, pid=%ld\n",
(u_long)zp->z_ftime, inet_ntoa(zp->z_xaddr),
- zp->z_flags, (int)zp->z_xferpid);
+ zp->z_flags, (long)zp->z_xferpid);
sprintf(buf, ";\tz_addr[%d]: ", zp->z_addrcnt); /*SAFE*/
pre = buf;
for (cnt = 0; cnt < zp->z_addrcnt; cnt++) {
diff --git a/usr.sbin/named/named/ns_main.c b/usr.sbin/named/named/ns_main.c
index 8ec43398cef..36ed2f1cc50 100644
--- a/usr.sbin/named/named/ns_main.c
+++ b/usr.sbin/named/named/ns_main.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: ns_main.c,v 1.18 2002/02/16 21:28:06 millert Exp $ */
+/* $OpenBSD: ns_main.c,v 1.19 2002/05/28 01:23:13 deraadt Exp $ */
#if !defined(lint) && !defined(SABER)
#if 0
static char sccsid[] = "@(#)ns_main.c 4.55 (Berkeley) 7/1/91";
static char rcsid[] = "$From: ns_main.c,v 8.26 1998/05/11 04:19:45 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: ns_main.c,v 1.18 2002/02/16 21:28:06 millert Exp $";
+static char rcsid[] = "$OpenBSD: ns_main.c,v 1.19 2002/05/28 01:23:13 deraadt Exp $";
#endif
#endif /* not lint */
@@ -470,7 +470,7 @@ main(argc, argv, envp)
#else /*PID_FIX*/
fp = fopen(PidFile, "w");
if (fp != NULL) {
- fprintf(fp, "%d\n", getpid());
+ fprintf(fp, "%ld\n", (long)getpid());
fprintf(fp, "%s\n", nsargs);
(void) my_fclose(fp);
}
diff --git a/usr.sbin/named/named/ns_maint.c b/usr.sbin/named/named/ns_maint.c
index 905dca1ed29..fa2ba5ff286 100644
--- a/usr.sbin/named/named/ns_maint.c
+++ b/usr.sbin/named/named/ns_maint.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: ns_maint.c,v 1.4 2002/02/16 21:28:06 millert Exp $ */
+/* $OpenBSD: ns_maint.c,v 1.5 2002/05/28 01:23:13 deraadt Exp $ */
#if !defined(lint) && !defined(SABER)
#if 0
static char sccsid[] = "@(#)ns_maint.c 4.39 (Berkeley) 3/2/91";
static char rcsid[] = "$From: ns_maint.c,v 8.18 1996/09/22 00:13:10 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: ns_maint.c,v 1.4 2002/02/16 21:28:06 millert Exp $";
+static char rcsid[] = "$OpenBSD: ns_maint.c,v 1.5 2002/05/28 01:23:13 deraadt Exp $";
#endif
#endif /* not lint */
@@ -502,7 +502,7 @@ startxfer(zp)
/* Parent. */
xferstatus[i].xfer_pid = pid; /* XXX - small race condition here if we
* can't hold signals */
- dprintf(1, (ddt, "started xfer child %d\n", pid));
+ dprintf(1, (ddt, "started xfer child %ld\n", (long)pid));
zp->z_flags &= ~Z_NEED_XFER;
zp->z_flags |= Z_XFER_RUNNING;
zp->z_xferpid = pid;
@@ -818,17 +818,17 @@ abortxfer(zp)
if (zp->z_flags & Z_XFER_GONE)
syslog(LOG_WARNING,
- "zone transfer timeout for \"%s\"; pid %lu missing",
- zp->z_origin, (u_long)zp->z_xferpid);
+ "zone transfer timeout for \"%s\"; pid %ld missing",
+ zp->z_origin, (long)zp->z_xferpid);
else if (kill(zp->z_xferpid, SIGKILL) == -1)
syslog(LOG_WARNING,
- "zone transfer timeout for \"%s\"; kill pid %lu: %m",
- zp->z_origin, (u_long)zp->z_xferpid);
+ "zone transfer timeout for \"%s\"; kill pid %ld: %m",
+ zp->z_origin, (long)zp->z_xferpid);
else
syslog(LOG_WARNING,
"zone transfer timeout for \"%s\"; second kill\
-pid %lu - forgetting, processes may accumulate",
- zp->z_origin, (u_long)zp->z_xferpid);
+pid %ld - forgetting, processes may accumulate",
+ zp->z_origin, (long)zp->z_xferpid);
zp->z_xferpid = 0;
xfers_running--;
@@ -840,14 +840,14 @@ pid %lu - forgetting, processes may accumulate",
zp->z_flags |= Z_XFER_GONE;
else {
syslog(LOG_WARNING,
- "zone transfer timeout for \"%s\"; pid %lu kill failed %m",
- zp->z_origin, (u_long)zp->z_xferpid);
+ "zone transfer timeout for \"%s\"; pid %ld kill failed %m",
+ zp->z_origin, (long)zp->z_xferpid);
zp->z_flags |= Z_XFER_ABORTED;
}
} else {
syslog(LOG_NOTICE,
- "zone transfer timeout for \"%s\"; pid %lu killed",
- zp->z_origin, (u_long)zp->z_xferpid);
+ "zone transfer timeout for \"%s\"; pid %ld killed",
+ zp->z_origin, (long)zp->z_xferpid);
zp->z_flags |= Z_XFER_ABORTED;
}
}
@@ -859,7 +859,8 @@ pid %lu - forgetting, processes may accumulate",
SIG_FN
reapchild()
{
- int pid, i, save_errno;
+ int i, save_errno;
+ pid_t pid;
#if defined(sequent)
union wait status;
#else
@@ -896,7 +897,8 @@ void
endxfer()
{
register struct zoneinfo *zp;
- int exitstatus, pid, i;
+ int exitstatus, i;
+ pid_t pid;
#if defined(sequent)
union wait status;
#else
@@ -921,8 +923,8 @@ endxfer()
zp->z_flags &=
~(Z_XFER_RUNNING|Z_XFER_ABORTED|Z_XFER_GONE);
dprintf(1, (ddt,
- "\nendxfer: child %d zone %s returned status=%d termsig=%d\n",
- pid, zp->z_origin, exitstatus,
+ "\nendxfer: child %ld zone %s returned status=%d termsig=%d\n",
+ (long)pid, zp->z_origin, exitstatus,
WIFSIGNALED(status) ?WTERMSIG(status) :-1
)
);
diff --git a/usr.sbin/named/named/ns_req.c b/usr.sbin/named/named/ns_req.c
index 0c783a7e188..8d3501ea85b 100644
--- a/usr.sbin/named/named/ns_req.c
+++ b/usr.sbin/named/named/ns_req.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: ns_req.c,v 1.9 2002/02/17 19:42:37 millert Exp $ */
+/* $OpenBSD: ns_req.c,v 1.10 2002/05/28 01:23:13 deraadt Exp $ */
#if !defined(lint) && !defined(SABER)
#if 0
static char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91";
static char rcsid[] = "$From: ns_req.c,v 8.30 1998/05/11 04:19:45 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: ns_req.c,v 1.9 2002/02/17 19:42:37 millert Exp $";
+static char rcsid[] = "$OpenBSD: ns_req.c,v 1.10 2002/05/28 01:23:13 deraadt Exp $";
#endif
#endif /* not lint */
@@ -2017,8 +2017,8 @@ startxfr(qsp, np, soa, soalen, class, dname)
break;
default:
/* parent */
- syslog(LOG_DEBUG, "zone transfer of \"%s\" to %s (pid %lu)",
- dname, sin_ntoa(&qsp->s_from), (u_long)pid);
+ syslog(LOG_DEBUG, "zone transfer of \"%s\" to %s (pid %ld)",
+ dname, sin_ntoa(&qsp->s_from), (long)pid);
close(pipefd[0]); /* close the read end */
sqrm(qsp);
/* close the write end to release the child */
@@ -2052,7 +2052,7 @@ startxfr(qsp, np, soa, soalen, class, dname)
#ifdef RENICE
nice(-40); nice(20); nice(0); /* back to "normal" */
#endif
- dprintf(5, (ddt, "startxfr: child pid %lu\n", (u_long)pid));
+ dprintf(5, (ddt, "startxfr: child pid %ld\n", (long)pid));
if (!(rfp = fdopen(qsp->s_rfd, "w"))) {
syslog(LOG_ERR, "fdopen: %m");