[isisd] Fix compiler warnings and allow v4-only compilation
2006-12-08 Hannes Gredler <hannes@gredler.at>
* isis_adjacency.c: (isis_new_adj) Allow NULL snpa argument.
* isis_pdu.c: (various) Update calls to isis_new_adj() to pass
NULL and use default.
* (general) Add forward declarations where required.
Fix up const char *'s.
Allow V4-only compilation.
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index d8c7448..aab8d1a 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -72,7 +72,12 @@
return NULL;
}
+ if (snpa) {
memcpy (adj->snpa, snpa, 6);
+ } else {
+ memset (adj->snpa, ' ', 6);
+ }
+
adj->circuit = circuit;
adj->level = level;
adj->flaps = 0;