[Babel-users] [PATCH 2/6] Make v4prefix a shared constant between util.c and message.c
Dave Taht
dave.taht at gmail.com
Thu Mar 9 15:54:59 UTC 2017
From: Dave Taht <dave at taht.net>
Share the data better.
---
message.c | 3 +--
util.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/message.c b/message.c
index fdc1999..f8c4ad2 100644
--- a/message.c
+++ b/message.c
@@ -54,8 +54,7 @@ unsigned char *unicast_buffer = NULL;
struct neighbour *unicast_neighbour = NULL;
struct timeval unicast_flush_timeout = {0, 0};
-static const unsigned char v4prefix[16] =
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 };
+extern const unsigned char v4prefix[16];
#define MAX_CHANNEL_HOPS 20
diff --git a/util.c b/util.c
index 1c15dbf..0de2245 100644
--- a/util.c
+++ b/util.c
@@ -246,7 +246,7 @@ normalize_prefix(unsigned char *restrict ret,
return ret;
}
-static const unsigned char v4prefix[16] =
+const unsigned char v4prefix[16] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 };
static const unsigned char llprefix[16] =
--
2.7.4
More information about the Babel-users
mailing list