Use C99 initialization when necessary; apply static to internal rountines.
This makes nfsstat WARNS=3 clean.
This commit is contained in:
parent
4f619e0e57
commit
db995e0027
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194792
@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static const char copyright[] =
|
||||||
"@(#) Copyright (c) 1983, 1989, 1993\n\
|
"@(#) Copyright (c) 1983, 1989, 1993\n\
|
||||||
The Regents of the University of California. All rights reserved.\n";
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
@ -77,10 +77,10 @@ static const char rcsid[] =
|
|||||||
|
|
||||||
struct nlist nl[] = {
|
struct nlist nl[] = {
|
||||||
#define N_NFSSTAT 0
|
#define N_NFSSTAT 0
|
||||||
{ "nfsstats" },
|
{ .n_name = "nfsstats" },
|
||||||
#define N_NFSRVSTAT 1
|
#define N_NFSRVSTAT 1
|
||||||
{ "nfsrvstats" },
|
{ .n_name = "nfsrvstats" },
|
||||||
"",
|
{ .n_name = NULL },
|
||||||
};
|
};
|
||||||
kvm_t *kd;
|
kvm_t *kd;
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ main(int argc, char **argv)
|
|||||||
* Read the nfs stats using sysctl(3) for live kernels, or kvm_read
|
* Read the nfs stats using sysctl(3) for live kernels, or kvm_read
|
||||||
* for dead ones.
|
* for dead ones.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero)
|
readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
|
Loading…
Reference in New Issue
Block a user