Mark global functions and/or variables in snapinfo(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
This commit is contained in:
parent
0aa42e81b2
commit
f69e32f1cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227260
@ -39,14 +39,15 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
void find_inum(char *path);
|
static void find_inum(char *path);
|
||||||
void usage(void);
|
static void usage(void);
|
||||||
int compare_function(const char *, const struct stat *, int, struct FTW *);
|
static int compare_function(const char *, const struct stat *,
|
||||||
int find_snapshot(struct statfs *sfs);
|
int, struct FTW *);
|
||||||
|
static int find_snapshot(struct statfs *sfs);
|
||||||
|
|
||||||
int verbose;
|
static int verbose;
|
||||||
int cont_search;
|
static int cont_search;
|
||||||
uint32_t inode;
|
static uint32_t inode;
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
@ -112,7 +113,7 @@ main(int argc, char **argv)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
find_snapshot(struct statfs *sfs)
|
find_snapshot(struct statfs *sfs)
|
||||||
{
|
{
|
||||||
struct uufsd disk;
|
struct uufsd disk;
|
||||||
@ -138,7 +139,7 @@ find_snapshot(struct statfs *sfs)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
compare_function(const char *path, const struct stat *st, int flags,
|
compare_function(const char *path, const struct stat *st, int flags,
|
||||||
struct FTW * ftwv __unused)
|
struct FTW * ftwv __unused)
|
||||||
{
|
{
|
||||||
@ -157,7 +158,7 @@ compare_function(const char *path, const struct stat *st, int flags,
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
find_inum(char *path)
|
find_inum(char *path)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -169,7 +170,7 @@ find_inum(char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user