dect
/
libnl
Archived
13
0
Fork 0

Make some functions and global variables static

This commit is contained in:
Pavel Roskin 2011-08-04 11:59:03 -04:00 committed by Thomas Graf
parent f9993836ed
commit 7701c8572f
12 changed files with 19 additions and 17 deletions

View File

@ -506,7 +506,8 @@ void nl_cache_set_arg2(struct nl_cache *cache, int arg)
*
* @return 0 on success or a negative error code.
*/
int nl_cache_request_full_dump(struct nl_sock *sk, struct nl_cache *cache)
static int nl_cache_request_full_dump(struct nl_sock *sk,
struct nl_cache *cache)
{
NL_DBG(2, "Requesting dump from kernel for cache %p <%s>...\n",
cache, nl_cache_name(cache));
@ -537,8 +538,8 @@ static int update_msg_parser(struct nl_msg *msg, void *arg)
* @arg cache Cache
* @arg param Parser parameters
*/
int __cache_pickup(struct nl_sock *sk, struct nl_cache *cache,
struct nl_parser_param *param)
static int __cache_pickup(struct nl_sock *sk, struct nl_cache *cache,
struct nl_parser_param *param)
{
int err;
struct nl_cb *cb;

View File

@ -188,7 +188,7 @@ int nlmsg_size(int payload)
return NLMSG_HDRLEN + payload;
}
int nlmsg_msg_size(int payload)
static int nlmsg_msg_size(int payload)
{
return nlmsg_size(payload);
}
@ -255,7 +255,7 @@ int nlmsg_datalen(const struct nlmsghdr *nlh)
return nlh->nlmsg_len - NLMSG_HDRLEN;
}
int nlmsg_len(const struct nlmsghdr *nlh)
static int nlmsg_len(const struct nlmsghdr *nlh)
{
return nlmsg_datalen(nlh);
}

View File

@ -45,7 +45,7 @@
static struct nl_list_head pktloc_name_ht[PKTLOC_NAME_HT_SIZ];
/* djb2 */
unsigned int pktloc_hash(const char *str)
static unsigned int pktloc_hash(const char *str)
{
unsigned long hash = 5381;
int c;

View File

@ -145,7 +145,8 @@ static void netem_dump_line(struct rtnl_tc *tc, void *data,
nl_dump(p, "limit %d", netem->qnm_limit);
}
int netem_msg_fill_raw(struct rtnl_tc *tc, void *data, struct nl_msg *msg)
static int netem_msg_fill_raw(struct rtnl_tc *tc, void *data,
struct nl_msg *msg)
{
int err = 0;
struct tc_netem_qopt opts;

View File

@ -94,7 +94,7 @@ void nl_cli_tc_parse_linktype(struct rtnl_tc *tc, char *arg)
static NL_LIST_HEAD(tc_modules);
struct nl_cli_tc_module *__nl_cli_tc_lookup(struct rtnl_tc_ops *ops)
static struct nl_cli_tc_module *__nl_cli_tc_lookup(struct rtnl_tc_ops *ops)
{
struct nl_cli_tc_module *tm;

View File

@ -41,7 +41,7 @@ static void print_usage(void)
static char *prefix;
void print_prefix(struct nl_dump_params *p, int line)
static void print_prefix(struct nl_dump_params *p, int line)
{
if (prefix)
nl_dump(p, "%s", prefix);

View File

@ -14,7 +14,7 @@
#include <netlink/cli/link.h>
static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
struct nl_sock *sock;
static struct nl_sock *sock;
static void print_usage(void)
{

View File

@ -14,9 +14,9 @@
#include <netlink/cli/class.h>
#include <netlink/cli/link.h>
struct nl_sock *sock;
static struct nl_sock *sock;
struct nl_dump_params params = {
static struct nl_dump_params params = {
.dp_type = NL_DUMP_LINE,
};

View File

@ -14,7 +14,7 @@
#include <netlink/cli/link.h>
static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
struct nl_sock *sock;
static struct nl_sock *sock;
static void print_usage(void)
{

View File

@ -14,9 +14,9 @@
#include <netlink/cli/cls.h>
#include <netlink/cli/link.h>
struct nl_sock *sock;
static struct nl_sock *sock;
struct nl_dump_params params = {
static struct nl_dump_params params = {
.dp_type = NL_DUMP_LINE,
};

View File

@ -14,7 +14,7 @@
#include <netlink/cli/link.h>
static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
struct nl_sock *sock;
static struct nl_sock *sock;
static void print_usage(void)
{

View File

@ -15,7 +15,7 @@
#include <netlink/cli/link.h>
static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
struct nl_sock *sock;
static struct nl_sock *sock;
static void print_usage(void)
{