From owner-svn-src-all@FreeBSD.ORG Sun Nov 6 19:02:44 2011 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 3E2191065A79; Sun, 6 Nov 2011 19:02:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E2388FC22; Sun, 6 Nov 2011 19:02:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6J2ieM037210; Sun, 6 Nov 2011 19:02:44 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA6J2iJ2037208; Sun, 6 Nov 2011 19:02:44 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201111061902.pA6J2iJ2037208@svn.freebsd.org> From: Ed Schouten Date: Sun, 6 Nov 2011 19:02:44 +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: r227260 - head/usr.sbin/snapinfo 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: Sun, 06 Nov 2011 19:02:44 -0000 Author: ed Date: Sun Nov 6 19:02:43 2011 New Revision: 227260 URL: http://svn.freebsd.org/changeset/base/227260 Log: Mark global functions and/or variables in snapinfo(8) static where possible. This allows compilers and static analyzers to do more thorough analysis. Modified: head/usr.sbin/snapinfo/snapinfo.c Modified: head/usr.sbin/snapinfo/snapinfo.c ============================================================================== --- head/usr.sbin/snapinfo/snapinfo.c Sun Nov 6 19:02:37 2011 (r227259) +++ head/usr.sbin/snapinfo/snapinfo.c Sun Nov 6 19:02:43 2011 (r227260) @@ -39,14 +39,15 @@ #include #include -void find_inum(char *path); -void usage(void); -int compare_function(const char *, const struct stat *, int, struct FTW *); -int find_snapshot(struct statfs *sfs); - -int verbose; -int cont_search; -uint32_t inode; +static void find_inum(char *path); +static void usage(void); +static int compare_function(const char *, const struct stat *, + int, struct FTW *); +static int find_snapshot(struct statfs *sfs); + +static int verbose; +static int cont_search; +static uint32_t inode; int main(int argc, char **argv) @@ -112,7 +113,7 @@ main(int argc, char **argv) return (0); } -int +static int find_snapshot(struct statfs *sfs) { struct uufsd disk; @@ -138,7 +139,7 @@ find_snapshot(struct statfs *sfs) return 0; } -int +static int compare_function(const char *path, const struct stat *st, int flags, struct FTW * ftwv __unused) { @@ -157,7 +158,7 @@ compare_function(const char *path, const return (0); } -void +static void find_inum(char *path) { int ret; @@ -169,7 +170,7 @@ find_inum(char *path) } } -void +static void usage(void) {