summaryrefslogtreecommitdiff
path: root/pathd/pathd.c
diff options
context:
space:
mode:
authorJavier Garcia <javier.garcia@voltanet.io>2021-05-13 13:17:44 +0200
committerJavier Garcia <javier.garcia@voltanet.io>2021-05-18 19:50:41 +0200
commitac57e2c9b96747f5f1a7484d5955688cf6400314 (patch)
tree2c233f99589d535564f89bf9972156e021a68f83 /pathd/pathd.c
parent04b122335b1c2964c6363c81dba10aa2986ae12e (diff)
pathd: Clean coverity issues after merge pathd link state feature.
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
Diffstat (limited to 'pathd/pathd.c')
-rw-r--r--pathd/pathd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pathd/pathd.c b/pathd/pathd.c
index 2462b08306..9dc3a41638 100644
--- a/pathd/pathd.c
+++ b/pathd/pathd.c
@@ -195,14 +195,16 @@ int srte_segment_entry_set_nai(struct srte_segment_entry *segment,
struct ipaddr *remote_ip, uint32_t remote_iface,
uint8_t algo, uint8_t pref_len)
{
+
int32_t status = 0;
struct prefix pre = {0};
- segment->nai_type = type;
- memcpy(&segment->nai_local_addr, local_ip, sizeof(struct ipaddr));
if (!segment || !local_ip || !remote_ip)
return 1;
+ segment->nai_type = type;
+ memcpy(&segment->nai_local_addr, local_ip, sizeof(struct ipaddr));
+
switch (type) {
case SRTE_SEGMENT_NAI_TYPE_IPV4_NODE:
case SRTE_SEGMENT_NAI_TYPE_IPV6_NODE: