lib: random unused bits cleanup

Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
David Lamparter 2019-11-27 21:49:00 +01:00
parent 25d8623340
commit eb51bb9b1f
7 changed files with 12 additions and 34 deletions

View file

@ -114,12 +114,6 @@ char *buffer_getstr(struct buffer *b)
return s; return s;
} }
/* Return 1 if buffer is empty. */
int buffer_empty(struct buffer *b)
{
return (b->head == NULL);
}
/* Clear and free all allocated data. */ /* Clear and free all allocated data. */
void buffer_reset(struct buffer *b) void buffer_reset(struct buffer *b)
{ {

View file

@ -2498,8 +2498,8 @@ DEFUN (no_ipv6_access_list_remark_comment,
return no_ipv6_access_list_remark(self, vty, argc, argv); return no_ipv6_access_list_remark(self, vty, argc, argv);
} }
void config_write_access_zebra(struct vty *, struct filter *); static void config_write_access_zebra(struct vty *, struct filter *);
void config_write_access_cisco(struct vty *, struct filter *); static void config_write_access_cisco(struct vty *, struct filter *);
/* show access-list command. */ /* show access-list command. */
static int filter_show(struct vty *vty, const char *name, afi_t afi) static int filter_show(struct vty *vty, const char *name, afi_t afi)
@ -2685,7 +2685,7 @@ DEFUN (show_ipv6_access_list_name,
return filter_show(vty, argv[idx_word]->arg, AFI_IP6); return filter_show(vty, argv[idx_word]->arg, AFI_IP6);
} }
void config_write_access_cisco(struct vty *vty, struct filter *mfilter) static void config_write_access_cisco(struct vty *vty, struct filter *mfilter)
{ {
struct filter_cisco *filter; struct filter_cisco *filter;
@ -2724,7 +2724,7 @@ void config_write_access_cisco(struct vty *vty, struct filter *mfilter)
} }
} }
void config_write_access_zebra(struct vty *vty, struct filter *mfilter) static void config_write_access_zebra(struct vty *vty, struct filter *mfilter)
{ {
struct filter_zebra *filter; struct filter_zebra *filter;
struct prefix *p; struct prefix *p;

View file

@ -38,9 +38,9 @@ DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command desc")
/** headers **/ /** headers **/
void grammar_sandbox_init(void); void grammar_sandbox_init(void);
void pretty_print_graph(struct vty *vty, struct graph_node *, int, int, static void pretty_print_graph(struct vty *vty, struct graph_node *, int, int,
struct graph_node **, size_t); struct graph_node **, size_t);
void init_cmdgraph(struct vty *, struct graph **); static void init_cmdgraph(struct vty *, struct graph **);
/** shim interface commands **/ /** shim interface commands **/
static struct graph *nodegraph = NULL, *nodegraph_free = NULL; static struct graph *nodegraph = NULL, *nodegraph_free = NULL;
@ -491,8 +491,9 @@ void grammar_sandbox_init(void)
* @param start the node to take as the root * @param start the node to take as the root
* @param level indent level for recursive calls, always pass 0 * @param level indent level for recursive calls, always pass 0
*/ */
void pretty_print_graph(struct vty *vty, struct graph_node *start, int level, static void pretty_print_graph(struct vty *vty, struct graph_node *start,
int desc, struct graph_node **stack, size_t stackpos) int level, int desc, struct graph_node **stack,
size_t stackpos)
{ {
// print this node // print this node
char tokennum[32]; char tokennum[32];
@ -550,7 +551,7 @@ void pretty_print_graph(struct vty *vty, struct graph_node *start, int level,
} }
/** stuff that should go in command.c + command.h */ /** stuff that should go in command.c + command.h */
void init_cmdgraph(struct vty *vty, struct graph **graph) static void init_cmdgraph(struct vty *vty, struct graph **graph)
{ {
// initialize graph, add start noe // initialize graph, add start noe
*graph = graph_new(); *graph = graph_new();

View file

@ -121,21 +121,6 @@ int setsockopt_ipv6_pktinfo(int sock, int val)
return ret; return ret;
} }
/* Set multicast hops val to the socket. */
int setsockopt_ipv6_checksum(int sock, int val)
{
int ret;
#ifdef GNU_LINUX
ret = setsockopt(sock, IPPROTO_RAW, IPV6_CHECKSUM, &val, sizeof(val));
#else
ret = setsockopt(sock, IPPROTO_IPV6, IPV6_CHECKSUM, &val, sizeof(val));
#endif /* GNU_LINUX */
if (ret < 0)
flog_err(EC_LIB_SOCKET, "can't setsockopt IPV6_CHECKSUM");
return ret;
}
/* Set multicast hops val to the socket. */ /* Set multicast hops val to the socket. */
int setsockopt_ipv6_multicast_hops(int sock, int val) int setsockopt_ipv6_multicast_hops(int sock, int val)
{ {

View file

@ -33,7 +33,6 @@ extern int getsockopt_so_sendbuf(const int sock);
extern int getsockopt_so_recvbuf(const int sock); extern int getsockopt_so_recvbuf(const int sock);
extern int setsockopt_ipv6_pktinfo(int, int); extern int setsockopt_ipv6_pktinfo(int, int);
extern int setsockopt_ipv6_checksum(int, int);
extern int setsockopt_ipv6_multicast_hops(int, int); extern int setsockopt_ipv6_multicast_hops(int, int);
extern int setsockopt_ipv6_unicast_hops(int, int); extern int setsockopt_ipv6_unicast_hops(int, int);
extern int setsockopt_ipv6_hoplimit(int, int); extern int setsockopt_ipv6_hoplimit(int, int);

View file

@ -32,7 +32,7 @@
* Wrapper this silliness if we * Wrapper this silliness if we
* don't have systemd * don't have systemd
*/ */
void systemd_send_information(const char *info) static void systemd_send_information(const char *info)
{ {
#if defined HAVE_SYSTEMD #if defined HAVE_SYSTEMD
sd_notify(0, info); sd_notify(0, info);

View file

@ -32,7 +32,6 @@ extern "C" {
* To turn on systemd compilation, use --enable-systemd on * To turn on systemd compilation, use --enable-systemd on
* configure run. * configure run.
*/ */
void systemd_send_information(const char *info);
void systemd_send_stopping(void); void systemd_send_stopping(void);
/* /*