]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: random unused bits cleanup
authorDavid Lamparter <equinox@diac24.net>
Wed, 27 Nov 2019 20:49:00 +0000 (21:49 +0100)
committerDavid Lamparter <equinox@diac24.net>
Sat, 14 Dec 2019 11:41:19 +0000 (12:41 +0100)
Signed-off-by: David Lamparter <equinox@diac24.net>
lib/buffer.c
lib/filter.c
lib/grammar_sandbox.c
lib/sockopt.c
lib/sockopt.h
lib/systemd.c
lib/systemd.h

index bb2cdb7e5449dd2084e8a32a90df1620a09dc42f..766b9791a5d5034e5856239bb3e2e3ba2bd6ea94 100644 (file)
@@ -114,12 +114,6 @@ char *buffer_getstr(struct buffer *b)
        return s;
 }
 
-/* Return 1 if buffer is empty. */
-int buffer_empty(struct buffer *b)
-{
-       return (b->head == NULL);
-}
-
 /* Clear and free all allocated data. */
 void buffer_reset(struct buffer *b)
 {
index ed3ffe9c67226d70b5bc9a3511cbe568cccbd8f9..31e25d600136920c74076d4be64fb0459aae309a 100644 (file)
@@ -2498,8 +2498,8 @@ DEFUN (no_ipv6_access_list_remark_comment,
        return no_ipv6_access_list_remark(self, vty, argc, argv);
 }
 
-void config_write_access_zebra(struct vty *, struct filter *);
-void config_write_access_cisco(struct vty *, struct filter *);
+static void config_write_access_zebra(struct vty *, struct filter *);
+static void config_write_access_cisco(struct vty *, struct filter *);
 
 /* show access-list command. */
 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);
 }
 
-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;
 
@@ -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 prefix *p;
index a23874a517490d23dab956a153badc3aac7eb009..8ccdbfcbc12532aacf01b17e2790415467452ed9 100644 (file)
@@ -38,9 +38,9 @@ DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command desc")
 
 /** headers **/
 void grammar_sandbox_init(void);
-void pretty_print_graph(struct vty *vty, struct graph_node *, int, int,
-                       struct graph_node **, size_t);
-void init_cmdgraph(struct vty *, struct graph **);
+static void pretty_print_graph(struct vty *vty, struct graph_node *, int, int,
+                              struct graph_node **, size_t);
+static void init_cmdgraph(struct vty *, struct graph **);
 
 /** shim interface commands **/
 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 level indent level for recursive calls, always pass 0
  */
-void pretty_print_graph(struct vty *vty, struct graph_node *start, int level,
-                       int desc, struct graph_node **stack, size_t stackpos)
+static void pretty_print_graph(struct vty *vty, struct graph_node *start,
+                              int level, int desc, struct graph_node **stack,
+                              size_t stackpos)
 {
        // print this node
        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 */
-void init_cmdgraph(struct vty *vty, struct graph **graph)
+static void init_cmdgraph(struct vty *vty, struct graph **graph)
 {
        // initialize graph, add start noe
        *graph = graph_new();
index 7726d74ff7c4f36df2ba1ba0e2579884af2a38ba..3b12d16cbc7a0d5a5914d0f61c70eadd54ebac57 100644 (file)
@@ -121,21 +121,6 @@ int setsockopt_ipv6_pktinfo(int sock, int val)
        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. */
 int setsockopt_ipv6_multicast_hops(int sock, int val)
 {
index f6b57b8e07f1fc9724c17ee7b799f7ff52c8181b..59d8a65964bbdd2631e1ffbf37e081a81a98815e 100644 (file)
@@ -33,7 +33,6 @@ extern int getsockopt_so_sendbuf(const int sock);
 extern int getsockopt_so_recvbuf(const int sock);
 
 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_unicast_hops(int, int);
 extern int setsockopt_ipv6_hoplimit(int, int);
index 16fbbff380be884e3cdfc685e8097074db7d86c7..81b0400ab99c067d00fa9dc8d8085168f3f35b41 100644 (file)
@@ -32,7 +32,7 @@
  * Wrapper this silliness if we
  * don't have systemd
  */
-void systemd_send_information(const char *info)
+static void systemd_send_information(const char *info)
 {
 #if defined HAVE_SYSTEMD
        sd_notify(0, info);
index 1f730720cefb18dc719a304f55e953b1010c3236..d9885c5d9c3ef2267613cee9ad9566d8300e4a30 100644 (file)
@@ -32,7 +32,6 @@ extern "C" {
  * To turn on systemd compilation, use --enable-systemd on
  * configure run.
  */
-void systemd_send_information(const char *info);
 void systemd_send_stopping(void);
 
 /*