Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jun 2009 23:18:19 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194792 - head/usr.bin/nfsstat
Message-ID:  <200906232318.n5NNIJDq094491@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Jun 23 23:18:19 2009
New Revision: 194792
URL: http://svn.freebsd.org/changeset/base/194792

Log:
  Use C99 initialization when necessary; apply static to internal rountines.
  This makes nfsstat WARNS=3 clean.

Modified:
  head/usr.bin/nfsstat/nfsstat.c

Modified: head/usr.bin/nfsstat/nfsstat.c
==============================================================================
--- head/usr.bin/nfsstat/nfsstat.c	Tue Jun 23 23:17:04 2009	(r194791)
+++ head/usr.bin/nfsstat/nfsstat.c	Tue Jun 23 23:18:19 2009	(r194792)
@@ -35,7 +35,7 @@
  */
 
 #ifndef lint
-static char copyright[] =
+static const char copyright[] =
 "@(#) Copyright (c) 1983, 1989, 1993\n\
 	The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */
@@ -77,10 +77,10 @@ static const char rcsid[] =
 
 struct nlist nl[] = {
 #define	N_NFSSTAT	0
-	{ "nfsstats" },
+	{ .n_name = "nfsstats" },
 #define	N_NFSRVSTAT	1
-	{ "nfsrvstats" },
-	"",
+	{ .n_name = "nfsrvstats" },
+	{ .n_name = NULL },
 };
 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
  * for dead ones.
  */
-void
+static void
 readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero)
 {
 	union {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906232318.n5NNIJDq094491>