From owner-svn-src-all@FreeBSD.ORG Tue Jun 23 23:18:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FB0F1065670; Tue, 23 Jun 2009 23:18:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1668FC14; Tue, 23 Jun 2009 23:18:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5NNIJh2094493; Tue, 23 Jun 2009 23:18:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5NNIJDq094491; Tue, 23 Jun 2009 23:18:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200906232318.n5NNIJDq094491@svn.freebsd.org> From: Xin LI Date: Tue, 23 Jun 2009 23:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194792 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2009 23:18:20 -0000 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 {