Pass a NULL to getbsize() for any arguments that aren't needed, and
remove the otherwise unused variables.
This commit is contained in:
parent
20a5af5edd
commit
ae46649fa5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ls.c,v 1.48 2003/05/11 08:06:01 kleink Exp $ */
|
||||
/* $NetBSD: ls.c,v 1.49 2003/05/30 00:17:25 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)ls.c 8.7 (Berkeley) 8/5/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: ls.c,v 1.48 2003/05/11 08:06:01 kleink Exp $");
|
||||
__RCSID("$NetBSD: ls.c,v 1.49 2003/05/30 00:17:25 simonb Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -115,7 +115,7 @@ ls_main(int argc, char *argv[])
|
||||
{
|
||||
static char dot[] = ".", *dotav[] = { dot, NULL };
|
||||
struct winsize win;
|
||||
int ch, fts_options, notused;
|
||||
int ch, fts_options;
|
||||
int kflag = 0;
|
||||
const char *p;
|
||||
|
||||
@ -283,7 +283,7 @@ ls_main(int argc, char *argv[])
|
||||
/* If -l or -s, figure out block size. */
|
||||
if (f_inode || f_longform || f_size) {
|
||||
if (!kflag)
|
||||
(void)getbsize(¬used, &blocksize);
|
||||
(void)getbsize(NULL, &blocksize);
|
||||
blocksize /= 512;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: du.c,v 1.21 2003/05/10 02:09:39 simonb Exp $ */
|
||||
/* $NetBSD: du.c,v 1.22 2003/05/30 00:17:26 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: du.c,v 1.21 2003/05/10 02:09:39 simonb Exp $");
|
||||
__RCSID("$NetBSD: du.c,v 1.22 2003/05/30 00:17:26 simonb Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -79,7 +79,7 @@ main(argc, argv)
|
||||
FTS *fts;
|
||||
FTSENT *p;
|
||||
int64_t totalblocks;
|
||||
int ftsoptions, listdirs, listfiles, notused;
|
||||
int ftsoptions, listdirs, listfiles;
|
||||
int Hflag, Lflag, Pflag, aflag, ch, cflag, gkmflag, rval, sflag;
|
||||
char *noargv[2];
|
||||
|
||||
@ -173,7 +173,7 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
if (!gkmflag)
|
||||
(void)getbsize(¬used, &blocksize);
|
||||
(void)getbsize(NULL, &blocksize);
|
||||
blocksize /= 512;
|
||||
|
||||
if ((fts = fts_open(argv, ftsoptions, NULL)) == NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quot.c,v 1.18 2003/04/02 10:39:50 fvdl Exp $ */
|
||||
/* $NetBSD: quot.c,v 1.19 2003/05/30 00:17:27 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1991, 1994 Wolfgang Solfrank.
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: quot.c,v 1.18 2003/04/02 10:39:50 fvdl Exp $");
|
||||
__RCSID("$NetBSD: quot.c,v 1.19 2003/05/30 00:17:27 simonb Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,6 @@ static char unused;
|
||||
static void (*func) __P((int, struct fs *, char *));
|
||||
static long blocksize;
|
||||
static char *header;
|
||||
static int headerlen;
|
||||
|
||||
/*
|
||||
* Original BSD quot doesn't round to number of frags/blocks,
|
||||
@ -618,7 +617,7 @@ main(argc, argv)
|
||||
|
||||
func = douser;
|
||||
#ifndef COMPAT
|
||||
header = getbsize(&headerlen, &blocksize);
|
||||
header = getbsize(NULL, &blocksize);
|
||||
#endif
|
||||
while (--argc > 0 && **++argv == '-') {
|
||||
while (*++*argv) {
|
||||
|
Loading…
Reference in New Issue
Block a user