1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Wall cleanup

This commit is contained in:
pvalchev 2001-07-27 20:34:36 +00:00
parent e5ba47dff3
commit 31cea0077b
16 changed files with 49 additions and 61 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: cleanerd.c,v 1.5 1997/08/05 23:42:54 angelos Exp $ */
/* $OpenBSD: cleanerd.c,v 1.6 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)cleanerd.c 8.5 (Berkeley) 6/10/95";*/
static char rcsid[] = "$OpenBSD: cleanerd.c,v 1.5 1997/08/05 23:42:54 angelos Exp $";
static char rcsid[] = "$OpenBSD: cleanerd.c,v 1.6 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -162,7 +162,7 @@ main(argc, argv)
struct timeval timeout; /* sleep timeout */
fsid_t fsid;
long clean_opts; /* cleaning options */
int i, nodaemon, segs_per_clean;
int nodaemon, segs_per_clean;
int opt, cmd_err;
char *fs_name; /* name of filesystem to clean */
extern int optind;
@ -278,7 +278,7 @@ clean_loop(fsp, nsegs, options)
(fsp->fi_cip->clean < max_free_segs &&
(fsp->fi_cip->clean <= MIN_SEGS(&fsp->fi_lfs) ||
fsp->fi_cip->clean < max_free_segs * BUSY_LIM))) {
printf("Cleaner Running at %s (%d of %d segments available)\n",
printf("Cleaner Running at %s (%d of %lu segments available)\n",
ctime(&now), fsp->fi_cip->clean, max_free_segs);
clean_fs(fsp, cost_benefit, nsegs, options);
return (1);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: library.c,v 1.3 1997/07/23 20:36:30 kstailey Exp $ */
/* $OpenBSD: library.c,v 1.4 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)library.c 8.3 (Berkeley) 5/24/95";*/
static char rcsid[] = "$OpenBSD: library.c,v 1.3 1997/07/23 20:36:30 kstailey Exp $";
static char rcsid[] = "$OpenBSD: library.c,v 1.4 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -110,7 +110,6 @@ get_fs_info (lstatfsp, use_mmap)
int use_mmap; /* IN: mmap or read */
{
FS_INFO *fsp;
int i;
fsp = (FS_INFO *)malloc(sizeof(FS_INFO));
if (fsp == NULL)
@ -136,8 +135,6 @@ reread_fs_info(fsp, use_mmap)
FS_INFO *fsp; /* IN: prointer fs_infos to reread */
int use_mmap;
{
int i;
if (statfs(fsp->fi_statfsp->f_mntonname, fsp->fi_statfsp))
err(1, "reread_fs_info: statfs failed");
get_ifile (fsp, use_mmap);
@ -376,7 +373,6 @@ add_blocks (fsp, bip, countp, sp, seg_buf, segaddr, psegaddr)
int db_per_block, i, j;
int db_frag;
u_long page_size;
long *lp;
#ifdef VERBOSE
printf("FILE INFOS\n");

View File

@ -1,4 +1,4 @@
/* $OpenBSD: print.c,v 1.2 1996/07/01 11:04:58 downsj Exp $ */
/* $OpenBSD: print.c,v 1.3 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)print.c 8.2 (Berkeley) 5/24/95";*/
static char rcsid[] = "$OpenBSD: print.c,v 1.2 1996/07/01 11:04:58 downsj Exp $";
static char rcsid[] = "$OpenBSD: print.c,v 1.3 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -101,7 +101,7 @@ dump_summary(lfsp, sp, flags, iaddrp)
dp = (daddr_t *)((caddr_t)sp + LFS_SUMMARY_SIZE);
for (--dp, i = 0; i < sp->ss_ninos; --dp)
if (flags & DUMP_INODE_ADDRS) {
(void)printf("\t0x%lx", *dp);
(void)printf("\t0x%x", *dp);
if (++i % 7 == 0)
(void)printf("\n");
} else

View File

@ -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;

View File

@ -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);

View File

@ -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);
}

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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)

View File

@ -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) {

View File

@ -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,

View File

@ -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>

View File

@ -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;