Mark global functions and/or variables in memcontrol(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
This commit is contained in:
parent
d938340a93
commit
6ea612c7ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227254
@ -39,8 +39,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
struct
|
static struct {
|
||||||
{
|
|
||||||
const char *name;
|
const char *name;
|
||||||
int val;
|
int val;
|
||||||
int kind;
|
int kind;
|
||||||
@ -67,8 +66,7 @@ static void clearfunc(int memfd, int argc, char *argv[]);
|
|||||||
static void helpfunc(int memfd, int argc, char *argv[]);
|
static void helpfunc(int memfd, int argc, char *argv[]);
|
||||||
static void help(const char *what);
|
static void help(const char *what);
|
||||||
|
|
||||||
struct
|
static struct {
|
||||||
{
|
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
const char *desc;
|
const char *desc;
|
||||||
void (*func)(int memfd, int argc, char *argv[]);
|
void (*func)(int memfd, int argc, char *argv[]);
|
||||||
|
Loading…
Reference in New Issue
Block a user