parser BUGFIX check return value
We know it succeeded before, but
whatever, coverity...
diff --git a/src/parser.c b/src/parser.c
index 70eaca8..f9503cb 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1626,7 +1626,11 @@
/* remove applied deviations */
for (i = 0; i < module->deviation_size; ++i) {
if (module->deviation[i].orig_node) {
- resolve_augment_schema_nodeid(module->deviation[i].target_name, NULL, module, (const struct lys_node **)&elem);
+ j = resolve_augment_schema_nodeid(module->deviation[i].target_name, NULL, module, (const struct lys_node **)&elem);
+ if (j) {
+ LOGINT;
+ continue;
+ }
lys_node_switch(elem, module->deviation[i].orig_node);
module->deviation[i].orig_node = elem;
}
@@ -1686,7 +1690,11 @@
/* remove applied deviations */
for (i = 0; i < submodule->deviation_size; ++i) {
if (submodule->deviation[i].orig_node) {
- resolve_augment_schema_nodeid(submodule->deviation[i].target_name, NULL, module, (const struct lys_node **)&elem);
+ j = resolve_augment_schema_nodeid(submodule->deviation[i].target_name, NULL, module, (const struct lys_node **)&elem);
+ if (j) {
+ LOGINT;
+ continue;
+ }
lys_node_switch(elem, submodule->deviation[i].orig_node);
submodule->deviation[i].orig_node = elem;
}