babeld: address some compilation warnings
Including system headers is not necessary with zebra.h included and
sometimes results in "__ASSERT_FUNCTION redefined" compilation warning.
* babeld.c
* babel_distribute_update_interface(): make static
* babel_interface.c
* interface_config_write(): unused 'babel_ifp'
* don't include system headers
* message.c
* send_request(): unused 'babel_ifp'
* send_multihop_request(): idem
* don't include system headers
* route.c: don't include system headers
* xroute.c: idem
* source.h: newline at EOF
* message.h: idem
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 0130f26..ff9c5eb 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -37,17 +37,6 @@
THE SOFTWARE.
*/
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-#include <arpa/inet.h>
-
#include <zebra.h>
#include "memory.h"
#include "log.h"
@@ -724,12 +713,9 @@
{
struct listnode *node;
struct interface *ifp;
- babel_interface_nfo *babel_ifp;
int write = 0;
for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) {
- babel_ifp = babel_get_if_nfo(ifp);
-
/* Do not display the interface if there is no configuration about it */
if (ifp->desc == NULL)
continue;
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 18b4e34..3dc35b5 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -560,7 +560,7 @@
}
}
-void
+static void
babel_distribute_update_interface (struct interface *ifp)
{
struct distribute *dist;
diff --git a/babeld/message.c b/babeld/message.c
index 57d875f..7930a1b 100644
--- a/babeld/message.c
+++ b/babeld/message.c
@@ -37,14 +37,6 @@
THE SOFTWARE.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <assert.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
#include <zebra.h>
#include "if.h"
@@ -1216,7 +1208,6 @@
send_request(struct interface *ifp,
const unsigned char *prefix, unsigned char plen)
{
- babel_interface_nfo *babel_ifp = NULL;
int v4, len;
if(ifp == NULL) {
@@ -1236,7 +1227,6 @@
if(!if_up(ifp))
return;
- babel_ifp = babel_get_if_nfo(ifp);
debugf(BABEL_DEBUG_COMMON,"sending request to %s for %s.",
ifp->name, prefix ? format_prefix(prefix, plen) : "any");
v4 = plen >= 96 && v4mapped(prefix);
@@ -1288,7 +1278,6 @@
unsigned short seqno, const unsigned char *id,
unsigned short hop_count)
{
- babel_interface_nfo *babel_ifp = NULL;
int v4, pb, len;
/* Make sure any buffered updates go out before this request. */
@@ -1308,7 +1297,6 @@
if(!if_up(ifp))
return;
- babel_ifp = babel_get_if_nfo(ifp);
debugf(BABEL_DEBUG_COMMON,"Sending request (%d) on %s for %s.",
hop_count, ifp->name, format_prefix(prefix, plen));
v4 = plen >= 96 && v4mapped(prefix);
diff --git a/babeld/route.c b/babeld/route.c
index a92018f..aa181be 100644
--- a/babeld/route.c
+++ b/babeld/route.c
@@ -37,13 +37,6 @@
THE SOFTWARE.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <assert.h>
-#include <sys/time.h>
-
#include <zebra.h>
#include "if.h"
diff --git a/babeld/xroute.c b/babeld/xroute.c
index 7b09cb8..eb4aaeb 100644
--- a/babeld/xroute.c
+++ b/babeld/xroute.c
@@ -37,14 +37,6 @@
THE SOFTWARE.
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-
#include <zebra.h>
#include "if.h"
#include "log.h"