summaryrefslogtreecommitdiffstats
path: root/usr.sbin/snapinfo
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-06 19:02:43 +0000
committered <ed@FreeBSD.org>2011-11-06 19:02:43 +0000
commitabe489102363343c774ced32a2ab70f0f93d44e3 (patch)
treea40da79149e727046717dd8e566e413f248c0991 /usr.sbin/snapinfo
parent1eab6ce2b204fac8fb7ed158bef54e4729c5c34b (diff)
downloadFreeBSD-src-abe489102363343c774ced32a2ab70f0f93d44e3.zip
FreeBSD-src-abe489102363343c774ced32a2ab70f0f93d44e3.tar.gz
Mark global functions and/or variables in snapinfo(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
Diffstat (limited to 'usr.sbin/snapinfo')
-rw-r--r--usr.sbin/snapinfo/snapinfo.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/usr.sbin/snapinfo/snapinfo.c b/usr.sbin/snapinfo/snapinfo.c
index 3ee66da..45882e0 100644
--- a/usr.sbin/snapinfo/snapinfo.c
+++ b/usr.sbin/snapinfo/snapinfo.c
@@ -39,14 +39,15 @@
#include <string.h>
#include <unistd.h>
-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);
+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);
-int verbose;
-int cont_search;
-uint32_t inode;
+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 struct stat *st, int flags,
return (0);
}
-void
+static void
find_inum(char *path)
{
int ret;
@@ -169,7 +170,7 @@ find_inum(char *path)
}
}
-void
+static void
usage(void)
{
OpenPOWER on IntegriCloud