summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/memconfig/memconfig.c3
-rw-r--r--usr.sbin/mrouted/prune.c1
-rw-r--r--usr.sbin/mtrace/mtrace.c40
-rw-r--r--usr.sbin/portmap/portmap.c6
-rw-r--r--usr.sbin/quotaon/quotaon.c3
-rw-r--r--usr.sbin/rpc.bootparamd/bootparamd.c5
-rw-r--r--usr.sbin/rpc.pcnfsd/pcnfsd_print.c2
-rw-r--r--usr.sbin/sa/main.c4
-rw-r--r--usr.sbin/sa/usrdb.c5
-rw-r--r--usr.sbin/sliplogin/sliplogin.c4
-rw-r--r--usr.sbin/syslogd/syslogd.c7
-rw-r--r--usr.sbin/wsconscfg/wsconscfg.c3
-rw-r--r--usr.sbin/ypbind/ypbind.c5
13 files changed, 40 insertions, 48 deletions
diff --git a/usr.sbin/memconfig/memconfig.c b/usr.sbin/memconfig/memconfig.c
index 0409c71b525..b4aa5e0ecb9 100644
--- a/usr.sbin/memconfig/memconfig.c
+++ b/usr.sbin/memconfig/memconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memconfig.c,v 1.2 1999/12/05 06:32:56 deraadt Exp $ */
+/* $OpenBSD: memconfig.c,v 1.3 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
* All rights reserved.
@@ -157,7 +157,6 @@ listfunc(memfd, argc, argv)
{
struct mem_range_desc *mrd;
int nd, i, j;
- int error;
int ch;
int showall = 0;
char *owner;
diff --git a/usr.sbin/mrouted/prune.c b/usr.sbin/mrouted/prune.c
index 3d28974707d..c62a1dc675a 100644
--- a/usr.sbin/mrouted/prune.c
+++ b/usr.sbin/mrouted/prune.c
@@ -1944,7 +1944,6 @@ dump_cache(fp2)
register struct rtentry *r;
register struct gtable *gt;
register struct stable *st;
- register struct ptable *pt;
register vifi_t i;
register time_t thyme = time(0);
diff --git a/usr.sbin/mtrace/mtrace.c b/usr.sbin/mtrace/mtrace.c
index aecfa41f75f..372b77339da 100644
--- a/usr.sbin/mtrace/mtrace.c
+++ b/usr.sbin/mtrace/mtrace.c
@@ -52,7 +52,7 @@
#ifndef lint
static char rcsid[] =
- "@(#) $Id: mtrace.c,v 1.6 2001/06/25 08:42:44 deraadt Exp $";
+ "@(#) $Id: mtrace.c,v 1.7 2001/07/27 20:34:36 pvalchev Exp $";
#endif
#include <netdb.h>
@@ -956,15 +956,15 @@ stat_line(r, s, have_next, rst)
}
if (debug > 2) {
- printf("\t\t\t\tv_in: %ld ", ntohl(s->tr_vifin));
- printf("v_out: %ld ", ntohl(s->tr_vifout));
- printf("pkts: %ld\n", ntohl(s->tr_pktcnt));
- printf("\t\t\t\tv_in: %ld ", ntohl(r->tr_vifin));
- printf("v_out: %ld ", ntohl(r->tr_vifout));
- printf("pkts: %ld\n", ntohl(r->tr_pktcnt));
- printf("\t\t\t\tv_in: %ld ",ntohl(s->tr_vifin)-ntohl(r->tr_vifin));
- printf("v_out: %ld ", ntohl(s->tr_vifout) - ntohl(r->tr_vifout));
- printf("pkts: %ld ", ntohl(s->tr_pktcnt) - ntohl(r->tr_pktcnt));
+ printf("\t\t\t\tv_in: %u ", ntohl(s->tr_vifin));
+ printf("v_out: %u ", ntohl(s->tr_vifout));
+ printf("pkts: %u\n", ntohl(s->tr_pktcnt));
+ printf("\t\t\t\tv_in: %u ", ntohl(r->tr_vifin));
+ printf("v_out: %u ", ntohl(r->tr_vifout));
+ printf("pkts: %u\n", ntohl(r->tr_pktcnt));
+ printf("\t\t\t\tv_in: %u ", ntohl(s->tr_vifin)-ntohl(r->tr_vifin));
+ printf("v_out: %u ", ntohl(s->tr_vifout) - ntohl(r->tr_vifout));
+ printf("pkts: %u ", ntohl(s->tr_pktcnt) - ntohl(r->tr_pktcnt));
printf("time: %d\n", timediff);
printf("\t\t\t\tres: %d\n", res);
}
@@ -1027,7 +1027,7 @@ fixup_stats(base, prev, new)
* doubt from now on.
*/
p->tr_pktcnt = b->tr_pktcnt = n->tr_pktcnt;
- *r++;
+ r++;
} else {
/*
* This is simply the situation that the original
@@ -1088,15 +1088,15 @@ print_stats(base, prev, new)
printf(" --------------------- --------------------\n");
}
if (debug > 2) {
- printf("\t\t\t\tv_in: %ld ", ntohl(n->tr_vifin));
- printf("v_out: %ld ", ntohl(n->tr_vifout));
- printf("pkts: %ld\n", ntohl(n->tr_pktcnt));
- printf("\t\t\t\tv_in: %ld ", ntohl(b->tr_vifin));
- printf("v_out: %ld ", ntohl(b->tr_vifout));
- printf("pkts: %ld\n", ntohl(b->tr_pktcnt));
- printf("\t\t\t\tv_in: %ld ", ntohl(n->tr_vifin) - ntohl(b->tr_vifin));
- printf("v_out: %ld ", ntohl(n->tr_vifout) - ntohl(b->tr_vifout));
- printf("pkts: %ld\n", ntohl(n->tr_pktcnt) - ntohl(b->tr_pktcnt));
+ printf("\t\t\t\tv_in: %u ", ntohl(n->tr_vifin));
+ printf("v_out: %u ", ntohl(n->tr_vifout));
+ printf("pkts: %u\n", ntohl(n->tr_pktcnt));
+ printf("\t\t\t\tv_in: %u ", ntohl(b->tr_vifin));
+ printf("v_out: %u ", ntohl(b->tr_vifout));
+ printf("pkts: %u\n", ntohl(b->tr_pktcnt));
+ printf("\t\t\t\tv_in: %u ", ntohl(n->tr_vifin) - ntohl(b->tr_vifin));
+ printf("v_out: %u ", ntohl(n->tr_vifout) - ntohl(b->tr_vifout));
+ printf("pkts: %u\n", ntohl(n->tr_pktcnt) - ntohl(b->tr_pktcnt));
printf("\t\t\t\treset: %d\n", *r);
}
diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c
index e01b03d4ac7..def3ae3da88 100644
--- a/usr.sbin/portmap/portmap.c
+++ b/usr.sbin/portmap/portmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: portmap.c,v 1.18 2000/07/31 17:28:26 deraadt Exp $ */
+/* $OpenBSD: portmap.c,v 1.19 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1996, 1997 Theo de Raadt (OpenBSD). All rights reserved.
@@ -44,7 +44,7 @@ char copyright[] =
#if 0
static char sccsid[] = "from: @(#)portmap.c 5.4 (Berkeley) 4/19/91";
#else
-static char rcsid[] = "$OpenBSD: portmap.c,v 1.18 2000/07/31 17:28:26 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: portmap.c,v 1.19 2001/07/27 20:34:36 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -332,7 +332,7 @@ reg_service(rqstp, xprt)
}
if (debugging)
- printf("set: prog %u vers %u port %u\n",
+ printf("set: prog %lu vers %lu port %lu\n",
reg.pm_prog, reg.pm_vers, reg.pm_port);
if (reg.pm_port & ~0xffff)
diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c
index 8e77faefeb6..c45f140d979 100644
--- a/usr.sbin/quotaon/quotaon.c
+++ b/usr.sbin/quotaon/quotaon.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)quotaon.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: quotaon.c,v 1.10 1997/06/22 06:09:02 deraadt Exp $";
+static char *rcsid = "$Id: quotaon.c,v 1.11 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
/*
@@ -72,7 +72,6 @@ main(argc, argv)
char *qfnp, *whoami;
long argnum, done = 0;
int i, offmode = 0, errs = 0;
- extern char *optarg;
extern int optind;
int ch;
diff --git a/usr.sbin/rpc.bootparamd/bootparamd.c b/usr.sbin/rpc.bootparamd/bootparamd.c
index c73167926c3..dee9ee9d1e4 100644
--- a/usr.sbin/rpc.bootparamd/bootparamd.c
+++ b/usr.sbin/rpc.bootparamd/bootparamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootparamd.c,v 1.9 1998/07/10 08:06:50 deraadt Exp $ */
+/* $OpenBSD: bootparamd.c,v 1.10 2001/07/27 20:34:36 pvalchev Exp $ */
/*
* This code is not copyright, and is placed in the public domain.
@@ -64,10 +64,8 @@ main(argc, argv)
char **argv;
{
SVCXPRT *transp;
- int i, s, pid;
struct hostent *he;
struct stat buf;
- char *optstring;
int c;
while ((c = getopt(argc, argv, "dsr:f:")) != -1)
@@ -204,7 +202,6 @@ bootparamproc_getfile_1_svc(getfile, rqstp)
bp_getfile_arg *getfile;
struct svc_req *rqstp;
{
- char *where;
static bp_getfile_res res;
int err;
diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_print.c b/usr.sbin/rpc.pcnfsd/pcnfsd_print.c
index 220bf46c362..0382e5d41ba 100644
--- a/usr.sbin/rpc.pcnfsd/pcnfsd_print.c
+++ b/usr.sbin/rpc.pcnfsd/pcnfsd_print.c
@@ -209,14 +209,12 @@ char *fname;
char *opts;
char **id;
{
-char snum[20];
static char req_id[256];
char cmdbuf[256];
char resbuf[256];
FILE *fd;
int i;
char *xcmd;
-char *cp;
int failed = 0;
#ifdef HACK_FOR_ROTATED_TRANSCRIPT
diff --git a/usr.sbin/sa/main.c b/usr.sbin/sa/main.c
index cad20968ab6..fbbc6610adc 100644
--- a/usr.sbin/sa/main.c
+++ b/usr.sbin/sa/main.c
@@ -33,7 +33,7 @@ static char copright[] =
"@(#) Copyright (c) 1994 Christopher G. Demetriou\n\
All rights reserved.\n";
-static char rcsid[] = "$Id: main.c,v 1.5 2000/11/10 15:33:15 provos Exp $";
+static char rcsid[] = "$Id: main.c,v 1.6 2001/07/27 20:34:36 pvalchev Exp $";
#endif
/*
@@ -350,7 +350,7 @@ acct_load(pn, wr)
if (sflag || (mflag && !qflag))
usracct_add(&ci);
} else if (!qflag)
- printf("%6u %12.2lf cpu %12quk mem %12qu io %s\n",
+ printf("%6u %12.2f cpu %12lluk mem %12llu io %s\n",
ci.ci_uid,
(ci.ci_utime + ci.ci_stime) / (double) AHZ,
ci.ci_mem, ci.ci_io, ci.ci_comm);
diff --git a/usr.sbin/sa/usrdb.c b/usr.sbin/sa/usrdb.c
index 656f5eb493a..ee92dfbca55 100644
--- a/usr.sbin/sa/usrdb.c
+++ b/usr.sbin/sa/usrdb.c
@@ -29,7 +29,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$Id: usrdb.c,v 1.2 1999/08/06 20:41:08 deraadt Exp $";
+static char rcsid[] = "$Id: usrdb.c,v 1.3 2001/07/27 20:34:36 pvalchev Exp $";
#endif
#include <sys/types.h>
@@ -172,7 +172,6 @@ usracct_update()
DB *saved_usracct_db;
DBT key, data;
BTREEINFO bti;
- uid_t uid;
int error, serr, nerr;
memset(&bti, 0, sizeof(bti));
@@ -243,7 +242,7 @@ usracct_print()
if (t < 0.0001) /* kill divide by zero */
t = 0.0001;
- printf("%12.2lf%s ", t / 60.0, "cpu");
+ printf("%12.2f%s ", t / 60.0, "cpu");
/* ui->ui_calls is always != 0 */
if (dflag)
diff --git a/usr.sbin/sliplogin/sliplogin.c b/usr.sbin/sliplogin/sliplogin.c
index 1bcfb2d3da9..69af6fbf095 100644
--- a/usr.sbin/sliplogin/sliplogin.c
+++ b/usr.sbin/sliplogin/sliplogin.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)sliplogin.c 5.6 (Berkeley) 3/2/91";*/
-static char rcsid[] = "$Id: sliplogin.c,v 1.13 2001/06/15 17:43:46 mickey Exp $";
+static char rcsid[] = "$Id: sliplogin.c,v 1.14 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
/*
@@ -119,7 +119,7 @@ findid(name)
static char raddr[16];
static char mask[16];
char user[MAXLOGNAME], *p;
- int i, j, n;
+ int n;
strlcpy(loginname, name, sizeof loginname);
if ((fp = fopen(_PATH_ACCESS, "r")) == NULL) {
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index d33ab82924d..38c431870ed 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.40 2001/02/07 06:15:46 fgsch Exp $ */
+/* $OpenBSD: syslogd.c,v 1.41 2001/07/27 20:34:36 pvalchev Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
#else
-static char rcsid[] = "$OpenBSD: syslogd.c,v 1.40 2001/02/07 06:15:46 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: syslogd.c,v 1.41 2001/07/27 20:34:36 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -94,6 +94,7 @@ static char rcsid[] = "$OpenBSD: syslogd.c,v 1.40 2001/02/07 06:15:46 fgsch Exp
#include <ctype.h>
#include <errno.h>
+#include <err.h>
#include <fcntl.h>
#include <paths.h>
#include <setjmp.h>
@@ -722,7 +723,7 @@ fprintlog(f, flags, msg)
case F_FORW:
dprintf(" %s\n", f->f_un.f_forw.f_hname);
l = snprintf(line, sizeof(line) - 1, "<%d>%.15s %s", f->f_prevpri,
- iov[0].iov_base, iov[4].iov_base);
+ (char *)iov[0].iov_base, (char *)iov[4].iov_base);
if (l > MAXLINE)
l = MAXLINE;
if (sendto(finet, line, l, 0,
diff --git a/usr.sbin/wsconscfg/wsconscfg.c b/usr.sbin/wsconscfg/wsconscfg.c
index 611c4109daa..cd23c9b4840 100644
--- a/usr.sbin/wsconscfg/wsconscfg.c
+++ b/usr.sbin/wsconscfg/wsconscfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsconscfg.c,v 1.5 2001/06/25 05:21:07 pvalchev Exp $ */
+/* $OpenBSD: wsconscfg.c,v 1.6 2001/07/27 20:34:36 pvalchev Exp $ */
/* $NetBSD: wsconscfg.c,v 1.4 1999/07/29 18:24:10 augustss Exp $ */
/*
@@ -34,6 +34,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index 8b533ee0fea..5fdd11baa32 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypbind.c,v 1.38 2000/04/11 11:52:55 itojun Exp $ */
+/* $OpenBSD: ypbind.c,v 1.39 2001/07/27 20:34:36 pvalchev Exp $ */
/*
* Copyright (c) 1997,1998 Theo de Raadt <deraadt@OpenBSD.org>
@@ -35,7 +35,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypbind.c,v 1.38 2000/04/11 11:52:55 itojun Exp $";
+static char rcsid[] = "$OpenBSD: ypbind.c,v 1.39 2001/07/27 20:34:36 pvalchev Exp $";
#endif
#include <sys/param.h>
@@ -751,7 +751,6 @@ broadcast(ypdb, buf, outlen)
int outlen;
{
struct ifaddrs *ifap, *ifa;
- int i, sock, len, inlen = 8192;
struct sockaddr_in bindsin;
struct in_addr in;