]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix coverity warnings
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 19 May 2021 12:53:16 +0000 (15:53 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 27 May 2021 10:18:42 +0000 (13:18 +0300)
CID 1504894

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/northbound.c

index 3634fed04f3a4f03af83295a3a33cf5a8552ce8a..6988fd9a9ced848cfca926af729a831b84b63af9 100644 (file)
@@ -599,6 +599,7 @@ static void nb_config_diff(const struct nb_config *config1,
                                   * the diff tree.
                                   */
                                target = yang_dnode_get(config2->dnode, path);
+                               assert(target);
                                nb_config_diff_created(target, &seq, changes);
 
                                /* Skip rest of sub-tree, move to next sibling
@@ -607,6 +608,7 @@ static void nb_config_diff(const struct nb_config *config1,
                                break;
                        case 'd': /* delete */
                                target = yang_dnode_get(config1->dnode, path);
+                               assert(target);
                                nb_config_diff_deleted(target, &seq, changes);
 
                                /* Skip rest of sub-tree, move to next sibling