summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/command.c1
-rw-r--r--lib/csv.c2
-rw-r--r--ospf6d/ospf6_asbr.c3
-rw-r--r--ospf6d/ospf6_route.c2
-rw-r--r--ospfd/ospf_snmp.c1
-rw-r--r--staticd/static_vty.c4
-rw-r--r--zebra/zebra_fpm_protobuf.c1
7 files changed, 9 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c
index 1df644210..3cc6806a8 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1197,6 +1197,7 @@ static int handle_pipe_action(struct vty *vty, const char *cmd_in,
/* retrieve action */
token = strsep(&working, " ");
+ assert(token);
/* match result to known actions */
if (strmatch(token, "include")) {
diff --git a/lib/csv.c b/lib/csv.c
index ce84783aa..2752974df 100644
--- a/lib/csv.c
+++ b/lib/csv.c
@@ -563,6 +563,8 @@ void csv_decode(csv_t *csv, char *inbuf)
csv_record_t *rec;
buf = (inbuf) ? inbuf : csv->buf;
+ assert(buf);
+
pos = strpbrk(buf, "\n");
while (pos != NULL) {
rec = calloc(1, sizeof(csv_record_t));
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 5af88defe..dc7a3f6d4 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -732,7 +732,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
? 1
: 2,
buf, listcount(route->paths),
- listcount(route->nh_list));
+ route->nh_list ?
+ listcount(route->nh_list) : 0);
}
if (listcount(route->paths)) {
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index a099eead4..021e825ae 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -732,7 +732,7 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route,
route->next = next;
if (node->info == next) {
- assert(next->rnode == node);
+ assert(next && next->rnode == node);
node->info = route;
UNSET_FLAG(next->flag, OSPF6_ROUTE_BEST);
SET_FLAG(route->flag, OSPF6_ROUTE_BEST);
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 19d2e6a95..755634a2f 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -995,7 +995,6 @@ static struct ospf_lsa *ospfLsdbLookup(struct variable *v, oid *name,
if (len <= 0)
type_next = 1;
else {
- len = 1;
type_next = 0;
*type = *offset;
}
diff --git a/staticd/static_vty.c b/staticd/static_vty.c
index b323612d7..f697969a7 100644
--- a/staticd/static_vty.c
+++ b/staticd/static_vty.c
@@ -88,8 +88,8 @@ static struct list *static_list;
static int static_list_compare_helper(const char *s1, const char *s2)
{
- /* Are Both NULL */
- if (s1 == s2)
+ /* extra (!s1 && !s2) to keep SA happy */
+ if (s1 == s2 || (!s1 && !s2))
return 0;
if (!s1 && s2)
diff --git a/zebra/zebra_fpm_protobuf.c b/zebra/zebra_fpm_protobuf.c
index ebd632270..be0f6a23b 100644
--- a/zebra/zebra_fpm_protobuf.c
+++ b/zebra/zebra_fpm_protobuf.c
@@ -129,6 +129,7 @@ static inline int add_nexthop(qpb_allocator_t *allocator, Fpm__AddRoute *msg,
}
// TODO: Use src.
+ (void)src;
return 1;
}