yang BUGFIX deafult in switch statement + change data type int to enum yytokentype
missing default in switch case statement
change data type from int to enum yytokentype in functions, which is parameter type
diff --git a/src/resolve.c b/src/resolve.c
index 651130f..d577645 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -4351,9 +4351,7 @@
stype->der = (struct lys_tpdf *)yang;
} else {
/* we need to always be able to free this, it's safe only in this case */
- if (yang->name) {
- free(yang->name);
- }
+ lydict_remove(mod->ctx, yang->name);
free(yang);
}
@@ -4726,9 +4724,7 @@
yin = (struct lyxml_elem *)((struct lys_type *)(*unres)->item[i])->der;
if (yin->flags & LY_YANG_STRUCTURE_FLAG) {
yang =(struct yang_type *)yin;
- if (yang->name) {
- free(yang->name);
- }
+ lydict_remove(module->ctx, yang->name);
free(yang);
} else {
lyxml_free(module->ctx, yin);