[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181115223640.411-11-stephen@networkplumber.org>
Date: Thu, 15 Nov 2018 14:36:28 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>
Subject: [PATCH iproute2 10/22] ipxfrm: make local functions static
Make functions only used in ipxfrm.c static.
Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
---
ip/ipxfrm.c | 11 ++++++-----
ip/xfrm.h | 9 ---------
ip/xfrm_monitor.c | 2 +-
3 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index 17ab4abef4be..2dea4e37f209 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -186,7 +186,7 @@ const char *strxf_algotype(int type)
return str;
}
-const char *strxf_mask8(__u8 mask)
+static const char *strxf_mask8(__u8 mask)
{
static char str[16];
const int sn = sizeof(mask) * 8 - 1;
@@ -209,7 +209,7 @@ const char *strxf_mask32(__u32 mask)
return str;
}
-const char *strxf_share(__u8 share)
+static const char *strxf_share(__u8 share)
{
static char str[32];
@@ -270,7 +270,7 @@ const char *strxf_ptype(__u8 ptype)
return str;
}
-void xfrm_id_info_print(xfrm_address_t *saddr, struct xfrm_id *id,
+static void xfrm_id_info_print(xfrm_address_t *saddr, struct xfrm_id *id,
__u8 mode, __u32 reqid, __u16 family, int force_spi,
FILE *fp, const char *prefix, const char *title)
{
@@ -337,7 +337,8 @@ static const char *strxf_limit(__u64 limit)
return str;
}
-void xfrm_stats_print(struct xfrm_stats *s, FILE *fp, const char *prefix)
+static void xfrm_stats_print(struct xfrm_stats *s, FILE *fp,
+ const char *prefix)
{
if (prefix)
fputs(prefix, fp);
@@ -371,7 +372,7 @@ static const char *strxf_time(__u64 time)
return str;
}
-void xfrm_lifetime_print(struct xfrm_lifetime_cfg *cfg,
+static void xfrm_lifetime_print(struct xfrm_lifetime_cfg *cfg,
struct xfrm_lifetime_cur *cur,
FILE *fp, const char *prefix)
{
diff --git a/ip/xfrm.h b/ip/xfrm.h
index 3b158ad71c13..72390d79cfb5 100644
--- a/ip/xfrm.h
+++ b/ip/xfrm.h
@@ -118,18 +118,9 @@ int xfrm_algotype_getbyname(char *name);
int xfrm_parse_mark(struct xfrm_mark *mark, int *argcp, char ***argvp);
const char *strxf_xfrmproto(__u8 proto);
const char *strxf_algotype(int type);
-const char *strxf_mask8(__u8 mask);
const char *strxf_mask32(__u32 mask);
-const char *strxf_share(__u8 share);
const char *strxf_proto(__u8 proto);
const char *strxf_ptype(__u8 ptype);
-void xfrm_id_info_print(xfrm_address_t *saddr, struct xfrm_id *id,
- __u8 mode, __u32 reqid, __u16 family, int force_spi,
- FILE *fp, const char *prefix, const char *title);
-void xfrm_stats_print(struct xfrm_stats *s, FILE *fp, const char *prefix);
-void xfrm_lifetime_print(struct xfrm_lifetime_cfg *cfg,
- struct xfrm_lifetime_cur *cur,
- FILE *fp, const char *prefix);
void xfrm_selector_print(struct xfrm_selector *sel, __u16 family,
FILE *fp, const char *prefix);
void xfrm_xfrma_print(struct rtattr *tb[], __u16 family,
diff --git a/ip/xfrm_monitor.c b/ip/xfrm_monitor.c
index eb07af17cadf..76905ed3f1e1 100644
--- a/ip/xfrm_monitor.c
+++ b/ip/xfrm_monitor.c
@@ -34,7 +34,7 @@
#include "ip_common.h"
static void usage(void) __attribute__((noreturn));
-int listen_all_nsid;
+static int listen_all_nsid;
static void usage(void)
{
--
2.17.1
Powered by blists - more mailing lists