Merge pull request #16632 from donaldsharp/SA_warnings_from_upstream

Sa warnings from upstream
This commit is contained in:
Jafar Al-Gharaibeh 2024-08-22 18:25:11 -04:00 committed by GitHub
commit 8f6c7c39e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -2933,7 +2933,7 @@ static inline bool gr_mode_matches(enum peer_mode peer_gr_mode,
unsigned int bgp_peer_gr_action(struct peer *peer, enum peer_mode old_state,
enum peer_mode new_state)
{
enum global_mode global_gr_mode = bgp_global_gr_mode_get(peer->bgp);
enum global_mode global_gr_mode;
bool session_reset = true;
if (old_state == new_state)

View File

@ -1398,8 +1398,10 @@ LY_ERR yang_lyd_trim_xpath(struct lyd_node **root, const char *xpath)
}
}
darr_foreach_i (remove, i) {
if (remove[i] == *root)
if (remove[i] == *root) {
assert(*root);
*root = (*root)->next;
}
lyd_free_tree(remove[i]);
}
darr_free(remove);