]> git.ipfire.org Git - thirdparty/libnl.git/commitdiff
Make some functions and global variables static
authorPavel Roskin <proski@gnu.org>
Thu, 4 Aug 2011 15:59:03 +0000 (11:59 -0400)
committerThomas Graf <tgraf@suug.ch>
Thu, 11 Aug 2011 12:49:51 +0000 (14:49 +0200)
12 files changed:
lib/cache.c
lib/msg.c
lib/route/pktloc.c
lib/route/qdisc/netem.c
src/lib/tc.c
src/nl-addr-list.c
src/nl-class-delete.c
src/nl-class-list.c
src/nl-cls-delete.c
src/nl-cls-list.c
src/nl-neigh-delete.c
src/nl-qdisc-delete.c

index 90c0c0fcea90af2093c28ba3fe1a6924ee7b2802..a1c8eae3bbb9598bb5e9fa5f395f2a8f548172d9 100644 (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;
index ee2922cb6416659e7a3211af8ce8e2bb316d43eb..235ee822c7f7c2668b288f6becc79cbbdad03d41 100644 (file)
--- a/lib/msg.c
+++ b/lib/msg.c
@@ -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);
 }
index b677ab50874f3ebd4ea31f47eec5674ec6ac63e2..c658e67cb87b4a840aeae8cd33dc406909508667 100644 (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;
index c86af56d9e8424cf03c1d4c3d78a2363443a6465..997a31f38ab5ff9b41ba239bb85d27aa7729405b 100644 (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;
index 4cdd0816c571bd852c1c3eddc7b49f78e3edf966..26124f1c95284600df8b68c886a6559129f82d77 100644 (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;
 
index 9b045a524c9de23076c610fb7c7dc69ca20d101c..5044d5ce80f5497c435fd8e9f96abbba39ac2760 100644 (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);
index 3df5a9aff328139fa0b9b3b9527a08273ffb6e0b..37657a47bcce4d94dd5b50a3f6af56be2eb0aa2f 100644 (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)
 {
index 44ca49b3629e08771d1acc74611f5578cb1ac412..c2423fbfb599c25fe17d4f80dd61eb522a36f785 100644 (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,
 };
 
index 7d998fda08f4cbe756a172a8f2fa8767ee1ebd0a..2b3db1f110110876e010ea0b50ccc4b271d3a1d3 100644 (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)
 {
index fcb5dcba81583f0b417a3e92cf2faad46af413e4..50725850a23756c285900727a448868d13226baf 100644 (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,
 };
 
index 887bd8460fd7a077de2e74a7ae5ee13375f03c0e..c41860880d1d11d37f9d1e20acc89a00e701129e 100644 (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)
 {
index 9c7ec14afcd8f64a86da93fa401a38b999b6ee1f..2f945bb248f6b85c7a6ece80d0761270507616be 100644 (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)
 {