diff mbox series

[iproute2,1/7] utils: make local cmdline functions static

Message ID 20230601172145.51357-2-stephen@networkplumber.org (mailing list archive)
State Accepted
Delegated to: Stephen Hemminger
Headers show
Series localize functions where possible | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Stephen Hemminger June 1, 2023, 5:21 p.m. UTC
No need to expose these parts of command line parsing.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 include/utils.h | 3 ---
 lib/utils.c     | 6 +++---
 2 files changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/include/utils.h b/include/utils.h
index 0f1b3bef34d8..0b5d86a26488 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -139,7 +139,6 @@  int get_addr_rta(inet_prefix *dst, const struct rtattr *rta, int family);
 int get_addr_ila(__u64 *val, const char *arg);
 
 int read_prop(const char *dev, char *prop, long *value);
-int get_hex(char c);
 int get_integer(int *val, const char *arg, int base);
 int get_unsigned(unsigned *val, const char *arg, int base);
 int get_time_rtt(unsigned *val, const char *arg, int *raw);
@@ -304,8 +303,6 @@  unsigned int print_name_and_link(const char *fmt,
 #define ntohll(x) ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
 
 extern int cmdlineno;
-ssize_t getcmdline(char **line, size_t *len, FILE *in);
-int makeargs(char *line, char *argv[], int maxargs);
 
 char *int_to_str(int val, char *buf);
 int get_guid(__u64 *guid, const char *arg);
diff --git a/lib/utils.c b/lib/utils.c
index 8dc302bdfe02..01f3a5f7e4ea 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -96,7 +96,7 @@  out:
 	return -1;
 }
 
-int get_hex(char c)
+static int get_hex(char c)
 {
 	if (c >= 'A' && c <= 'F')
 		return c - 'A' + 10;
@@ -1289,7 +1289,7 @@  unsigned int print_name_and_link(const char *fmt,
 int cmdlineno;
 
 /* Like glibc getline but handle continuation lines and comments */
-ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
+static ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
 {
 	ssize_t cc;
 	char *cp;
@@ -1336,7 +1336,7 @@  ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
 }
 
 /* split command line into argument vector */
-int makeargs(char *line, char *argv[], int maxargs)
+static int makeargs(char *line, char *argv[], int maxargs)
 {
 	static const char ws[] = " \t\r\n";
 	char *cp = line;